package com.loongtech.bi.manager.report;

import com.loongtech.bi.action.PageHelper;
import com.loongtech.bi.action.UIHelper;
import com.loongtech.bi.entity.pay.*;
import com.loongtech.bi.entity.player.*;
import com.loongtech.bi.manager.pay.*;
import com.loongtech.bi.manager.player.*;
import com.loongtech.bi.manager.realTime.BossRealTimeManager;
import com.loongtech.bi.manager.system.BiPlatformManager;
import com.loongtech.bi.support.Helper;
import com.loongtech.bi.support.chart.*;
import com.loongtech.core.jpa.manager.ManagerQueryCacheBase;
import com.loongtech.core.util.Time;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;
import java.util.Map.Entry;

/**
 * 运营报表-平台/渠道/区服manager
 *
 * @author marin
 * @date 2015-09-15
 */
@Service
public class GameReportManager extends ManagerQueryCacheBase<Object> {
    private static final long serialVersionUID = 1L;

    @Autowired
    NewUserManager newUserManager;
    @Autowired
    DistinctNewUserManager distinctNewUserManager;
    @Autowired
    ActiveDeviceManager activeDeviceManager;
    @Autowired
    NewDeviceManager newDeviceManager;
    @Autowired
    AcuManager acuManager;
    @Autowired
    PcuManager pcuManager;
    @Autowired
    LeftManager leftManager;
    @Autowired
    SevenLoginPercentManager sevenLoginPercentManager;
    @Autowired
    DaLoginTimeManager daLoginTimeManager;
    @Autowired
    DauManager dauManager;
    @Autowired
    DaPlayTimeManager daPlayTimeManager;
    @Autowired
    TotalCashManager totalCashManager;
    @Autowired
    FirstPayUserManager firstPayUserManager;
    @Autowired
    PayUserManager payUserManager;
    @Autowired
    NewUserLTVManager newUserLTVManager;
    @Autowired
    UserTwoStepLoginPercentManager userTwoStepLoginPercentManager;
    @Autowired
    NewUserAddCashUserManager newUserAddCashUserManager;

    public List<GameReportData> getAllGameReportData2(Date dateStart, Date dateEnd) {
        Map<String, GameReportData> tmpGRMap = new LinkedHashMap<>(); // key=day+platform+channel+server

        // 新增帐号
        List<EntityNewUser> list = newUserManager.getNewUsersByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list)) {
            for (EntityNewUser o : list) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setNewUser(o.getNew_user());
                int d = Time.getInterval(o.getDay(), new Date()) + 1;
                tmp.setTheLtvNewUser(d, o.getNew_user());
            }
        } else {
            return null;
        }

        // 激活设备
        List<EntityActiveDevice> list0 = activeDeviceManager.getActiveDevicesByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list0)) {
            for (EntityActiveDevice o : list0) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setActiveDevice(o.getActive_device());
            }
        }

        // 新增设备
        List<EntityNewDevice> list01 = newDeviceManager.getNewDevicesByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list01)) {
            for (EntityNewDevice o : list01) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setNewDevice(o.getNew_device());
                tmp.setActive2NewRadio(tmp.getActiveDevice() == 0 ? 0 : (float) (tmp.getNewDevice() * 1.0 / tmp.getActiveDevice()));
            }
        }

        // 留存
        List<EntitySecondLeft> list1 = leftManager.getLeftByDate2(dateStart, dateEnd, EntitySecondLeft.class);
        if (!Helper.isEmptyValue(list1)) {
            for (EntitySecondLeft o : list1) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe2Left(o.getUser_second_left());
                tmp.setThe2LeftLoginusernum(o.getLoginusernum());
                tmp.setThe2LeftUsercreatenum(o.getUsercreatenum());
            }
        }
        List<EntityThirdLeft> list2 = leftManager.getLeftByDate2(dateStart, dateEnd, EntityThirdLeft.class);
        if (!Helper.isEmptyValue(list2)) {
            for (EntityThirdLeft o : list2) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe3Left(o.getUser_third_left());
                tmp.setThe3LeftLoginusernum(o.getLoginusernum());
                tmp.setThe3LeftUsercreatenum(o.getUsercreatenum());
            }
        }
        List<EntitySevenLeft> list3 = leftManager.getLeftByDate2(dateStart, dateEnd, EntitySevenLeft.class);
        if (!Helper.isEmptyValue(list3)) {
            for (EntitySevenLeft o : list3) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe7Left(o.getUser_seven_left());
                tmp.setThe7LeftLoginusernum(o.getLoginusernum());
                tmp.setThe7LeftUsercreatenum(o.getUsercreatenum());
            }
        }

        // 设备留存
        List<EntityDeviceSecondLeft> dlist1 = leftManager.getLeftByDate2(dateStart, dateEnd, EntityDeviceSecondLeft.class);
        if (!Helper.isEmptyValue(dlist1)) {
            for (EntityDeviceSecondLeft o : dlist1) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setTheDevice2Left(o.getDevice_second_left());
            }
        }
        List<EntityDeviceThirdLeft> dlist2 = leftManager.getLeftByDate2(dateStart, dateEnd, EntityDeviceThirdLeft.class);
        if (!Helper.isEmptyValue(dlist2)) {
            for (EntityDeviceThirdLeft o : dlist2) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setTheDevice3Left(o.getDevice_third_left());
            }
        }
        List<EntityDeviceSevenLeft> dlist3 = leftManager.getLeftByDate2(dateStart, dateEnd, EntityDeviceSevenLeft.class);
        if (!Helper.isEmptyValue(dlist3)) {
            for (EntityDeviceSevenLeft o : dlist3) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setTheDevice7Left(o.getDevice_seven_left());
            }
        }
        //pcu
        List<EntityPcu> alist = pcuManager.getPcuByAllKind2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(alist)) {
            for (EntityPcu o : alist) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setPcu(o.getPcu());
            }
        }
        //acu
        List<EntityAcu> plist = acuManager.getAcuByAllKind2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(plist)) {
            for (EntityAcu o : plist) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setAcu(o.getAcu());
            }
        }

        // 分日活跃帐号数
        List<EntityDau> list7 = dauManager.getDauByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list7)) {
            for (EntityDau o : list7) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(o.getStartday());
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setActiveUserCountByDay(o.getDau());
            }
        }

        // 活跃帐号总数
        List<EntityDau> list71 = dauManager.getAllDauByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list71)) {
            for (EntityDau o : list71) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(o.getStartday());
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setActiveUserCount(o.getDau());
            }
        }

        // 人均在线时长(m)
        List<EntityDaPlayTime> list8 = daPlayTimeManager.getDaPlayTimeByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list8)) {
            for (EntityDaPlayTime o : list8) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setSumplaytime(o.getSumplaytime());
                tmp.setUseridnum(o.getUseridnum());
                tmp.setAvgOnlineTime((int) o.getDa_playtime());
            }
        }

        // 人均登录次数
        List<EntityDaLoginTime> loginlist = daLoginTimeManager.getDaLoginTimeByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(loginlist)) {
            for (EntityDaLoginTime o : loginlist) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setAvgLoginTime(o.getAveragetimes());
            }
        }

        // 付费金额
        List<EntityTotalCash> list9 = totalCashManager.getTotalCashByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list9)) {
            for (EntityTotalCash o : list9) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setPayCount(UIHelper.getYuan(o.getTotal_cash()));
            }
        }

        // 分日付费帐号数
        List<EntityPayUser> list10 = payUserManager.getPayUserByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list10)) {
            for (EntityPayUser o : list10) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(o.getStartday());
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setPayUserCountByDay(o.getAddcash_user());
                // 活跃付费率
                tmp.setActivePayRadio(tmp.getActiveUserCountByDay() == 0 ? 0 : (float) (tmp.getPayUserCountByDay() * 1.0 / tmp.getActiveUserCountByDay()));

                // 付费ARPU
                tmp.setPayARPU(tmp.getPayUserCountByDay() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tmp.getPayCount() * 1.0 / tmp.getPayUserCountByDay()));

                // 活跃ARPU
                tmp.setActiveARPU(tmp.getActiveUserCountByDay() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tmp.getPayCount() * 1.0 / tmp.getActiveUserCountByDay()));
            }
        }

        // 付费账号总数
        List<EntityPayUser> list12 = payUserManager.getAllPayUserByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list12)) {
            for (EntityPayUser o : list12) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(o.getStartday());
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setPayUserCount(o.getAddcash_user());
            }
        }

        // 新增账号付费人数
        List<EntityNewUserAddCashUser> list15 = newUserAddCashUserManager.getNewUserAddCashUsersByDate2(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list15)) {
            for (EntityNewUserAddCashUser o : list15) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setNewPayUserCount(o.getNew_user_addcash_user());
                // 新增帐号付费率
                tmp.setNewUserPayRatio(tmp.getNewUser() == 0 ? 0 : (float) (tmp.getNewPayUserCount() * 1.0 / tmp.getNewUser()));
            }
        }
        return new ArrayList<>(tmpGRMap.values());
    }




    public void updateData2(List<GameReportData> allData, List<GameReportData> platformDataList, List<GameReportData> detailChannelDataList, List<GameReportData> detailServerDataList) {
        Map<String, List<GameReportData>> paltformDataMap = new HashMap<>(); // 平台辅助map
        Map<String, List<GameReportData>> channelDataMap = new HashMap<>(); // 渠道辅助map
        Set<String> dateSet = new HashSet<>();  // 日期串set
        for (GameReportData oa : allData) {
            dateSet.add(oa.getDateStr());
            if (oa.isAllData() || !"0".equals(oa.getPlatformId())) {  // 全平台或者平台id不为0的，即按平台统计的
                List<GameReportData> oal1 = paltformDataMap.get(oa.getPlatformId());
                if (oal1 == null) {
                    oal1 = new ArrayList<>();
                    paltformDataMap.put(oa.getPlatformId(), oal1);
                }
                oal1.add(oa);
            }

            if (!"0".equals(oa.getChannelId())) {  // 渠道id不为0的
                List<GameReportData> oal2 = channelDataMap.get(oa.getChannelId());
                if (oal2 == null) {
                    oal2 = new ArrayList<>();
                    channelDataMap.put(oa.getChannelId(), oal2);
                }
                oal2.add(oa);
            }
        }


        // 组装平台数据
        for (Entry<String, List<GameReportData>> entry : paltformDataMap.entrySet()) {
            List<GameReportData> value = entry.getValue();
            Collections.sort(value, new GameReportData().comparatorDate2);
            GameReportData oa = new GameReportData();
            oa.setTogglerDatas(value);
            oa.setPlatformId(entry.getKey());
            for (GameReportData o : value) {
                oa.setNewDevice(oa.getNewDevice() + o.getNewDevice());
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setActiveDevice(oa.getActiveDevice() + o.getActiveDevice());
                oa.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + o.getThe2LeftLoginusernum());
                oa.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + o.getThe2LeftUsercreatenum());
                oa.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + o.getThe3LeftLoginusernum());
                oa.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + o.getThe3LeftUsercreatenum());
                oa.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + o.getThe7LeftLoginusernum());
                oa.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + o.getThe7LeftUsercreatenum());
                oa.setActiveUserCount(oa.getActiveUserCount() + o.getActiveUserCount());
                oa.setSumplaytime(oa.getSumplaytime() + o.getSumplaytime());
                oa.setUseridnum(oa.getUseridnum() + o.getUseridnum());
                oa.setAvgOnlineTime(oa.getAvgOnlineTime() + o.getAvgOnlineTime());
                oa.setPayCount(oa.getPayCount() + o.getPayCount());
                oa.setPayUserCount(oa.getPayUserCount() + o.getPayUserCount());
                oa.setNewPayUserCount(oa.getNewPayUserCount() + o.getNewPayUserCount());
                oa.setNewUserPayCount(oa.getNewUserPayCount() + o.getNewUserPayCount());
            }
            platformDataList.add(oa);
        }
        for (GameReportData tt : platformDataList) {
            tt.setThe2Left(tt.getThe2LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe2LeftLoginusernum() * 1.0 / tt.getThe2LeftUsercreatenum()));
            tt.setThe3Left(tt.getThe3LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe3LeftLoginusernum() * 1.0 / tt.getThe3LeftUsercreatenum()));
            tt.setThe7Left(tt.getThe7LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe7LeftLoginusernum() * 1.0 / tt.getThe7LeftUsercreatenum()));
            tt.setAvgOnlineTime((int) (tt.getAvgOnlineTime() * 1.0 / 60));
            tt.setActivePayRadio((float) ((tt.getPayUserCount()) * 1.0 / (tt.getActiveUserCount() == 0 ? 1 : tt.getActiveUserCount())));
            tt.setPayCount(tt.getPayCount());
            tt.setPayARPU(tt.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getPayUserCount()));
            tt.setActiveARPU(tt.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getActiveUserCount()));
            tt.setActive2NewRadio(tt.getActiveDevice() == 0 ? 0 : (float) (tt.getNewDevice() * 1.0 / tt.getActiveDevice()));
        }
        Collections.sort(platformDataList, new GameReportData().comparatorPlatformId);

        // 组装渠道数据
        for (Entry<String, List<GameReportData>> entry : channelDataMap.entrySet()) {
            List<GameReportData> value = entry.getValue();
            for (GameReportData tg : value) {
                tg.setPlatformId(BiPlatformManager.CHANNEL_PLATFORM_MAP.get(tg.getChannelId()) != null ? BiPlatformManager.CHANNEL_PLATFORM_MAP.get(tg.getChannelId()) : tg.getPlatformId());
            }
            Collections.sort(value, new GameReportData().comparatorDate2);
            GameReportData oa = new GameReportData();
            oa.setTogglerDatas(value);
            oa.setChannelId(entry.getKey());
            oa.setPlatformId(BiPlatformManager.CHANNEL_PLATFORM_MAP.get(entry.getKey()) != null ? BiPlatformManager.CHANNEL_PLATFORM_MAP.get(entry.getKey()) : "0");
            for (GameReportData o : value) {
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setActiveDevice(oa.getActiveDevice() + o.getActiveDevice());
            }

            detailChannelDataList.add(oa);
        }
        Collections.sort(detailChannelDataList, new GameReportData().comparatorChannelName);
    }






    /**
     * 得到符合条件的所有数据
     *
     * @return
     */
    public List<GameReportData> getAllGameReportData(Date dateStart, Date dateEnd) {
        Map<String, GameReportData> tmpGRMap = new LinkedHashMap<>(); // key=day+platform+channel+server

        // 新增帐号
        List<EntityNewUser> list = newUserManager.getNewUsersByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list)) {
            for (EntityNewUser o : list) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setNewUser(o.getNew_user());

                int d = Time.getInterval(o.getDay(), new Date()) + 1;
                tmp.setTheLtvNewUser(d, o.getNew_user());
            }
        } else {
            return null;
        }

        // 去重新增帐号
        List<EntityDistinctNewUser> list100 = distinctNewUserManager.getDistinctNewUsersByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list100)) {
            for (EntityDistinctNewUser o : list100) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setDistinctNewUser(o.getNew_user());
            }
        }

        // 激活设备
        List<EntityActiveDevice> list0 = activeDeviceManager.getActiveDevicesByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list0)) {
            for (EntityActiveDevice o : list0) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setActiveDevice(o.getActive_device());
            }
        }

        // 新增设备
        List<EntityNewDevice> list01 = newDeviceManager.getNewDevicesByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list01)) {
            for (EntityNewDevice o : list01) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setNewDevice(o.getNew_device());
                tmp.setActive2NewRadio(tmp.getActiveDevice() == 0 ? 0 : (float) (tmp.getNewDevice() * 1.0 / tmp.getActiveDevice()));
            }
        }

        // 留存
        List<EntitySecondLeft> list1 = leftManager.getLeftByDate(dateStart, dateEnd, EntitySecondLeft.class);
        if (!Helper.isEmptyValue(list1)) {
            for (EntitySecondLeft o : list1) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe2Left(o.getUser_second_left());
                tmp.setThe2LeftLoginusernum(o.getLoginusernum());
                tmp.setThe2LeftUsercreatenum(o.getUsercreatenum());
            }
        }
        List<EntityThirdLeft> list2 = leftManager.getLeftByDate(dateStart, dateEnd, EntityThirdLeft.class);
        if (!Helper.isEmptyValue(list2)) {
            for (EntityThirdLeft o : list2) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe3Left(o.getUser_third_left());
                tmp.setThe3LeftLoginusernum(o.getLoginusernum());
                tmp.setThe3LeftUsercreatenum(o.getUsercreatenum());
            }
        }
        List<EntitySevenLeft> list3 = leftManager.getLeftByDate(dateStart, dateEnd, EntitySevenLeft.class);
        if (!Helper.isEmptyValue(list3)) {
            for (EntitySevenLeft o : list3) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe7Left(o.getUser_seven_left());
                tmp.setThe7LeftLoginusernum(o.getLoginusernum());
                tmp.setThe7LeftUsercreatenum(o.getUsercreatenum());
            }
        }
        List<EntityFourteenLeft> list4 = leftManager.getLeftByDate(dateStart, dateEnd, EntityFourteenLeft.class);
        if (!Helper.isEmptyValue(list4)) {
            for (EntityFourteenLeft o : list4) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe14Left(o.getUser_fourteen_left());
                tmp.setThe14LeftLoginusernum(o.getLoginusernum());
                tmp.setThe14LeftUsercreatenum(o.getUsercreatenum());
            }
        }
        List<EntityMonthLeft> list5 = leftManager.getLeftByDate(dateStart, dateEnd, EntityMonthLeft.class);
        if (!Helper.isEmptyValue(list5)) {
            for (EntityMonthLeft o : list5) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe30Left(o.getUser_month_left());
                tmp.setThe30LeftLoginusernum(o.getLoginusernum());
                tmp.setThe30LeftUsercreatenum(o.getUsercreatenum());
            }
        }
        List<EntityUser60DayLeft> list560 = leftManager.getLeftByDate(dateStart, dateEnd, EntityUser60DayLeft.class);
        if (!Helper.isEmptyValue(list560)) {
            for (EntityUser60DayLeft o : list560) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe60Left(o.getLeftnum());
                tmp.setThe60LeftLoginusernum(o.getLoginusernum());
                tmp.setThe60LeftUsercreatenum(o.getUsercreatenum());
            }
        }
        List<EntityUser90DayLeft> list590 = leftManager.getLeftByDate(dateStart, dateEnd, EntityUser90DayLeft.class);
        if (!Helper.isEmptyValue(list590)) {
            for (EntityUser90DayLeft o : list590) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe90Left(o.getLeftnum());
                tmp.setThe90LeftLoginusernum(o.getLoginusernum());
                tmp.setThe90LeftUsercreatenum(o.getUsercreatenum());
            }
        }

        // 设备留存
        List<EntityDeviceSecondLeft> dlist1 = leftManager.getLeftByDate(dateStart, dateEnd, EntityDeviceSecondLeft.class);
        if (!Helper.isEmptyValue(dlist1)) {
            for (EntityDeviceSecondLeft o : dlist1) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setTheDevice2Left(o.getDevice_second_left());
            }
        }
        List<EntityDeviceThirdLeft> dlist2 = leftManager.getLeftByDate(dateStart, dateEnd, EntityDeviceThirdLeft.class);
        if (!Helper.isEmptyValue(dlist2)) {
            for (EntityDeviceThirdLeft o : dlist2) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setTheDevice3Left(o.getDevice_third_left());
            }
        }
        List<EntityDeviceSevenLeft> dlist3 = leftManager.getLeftByDate(dateStart, dateEnd, EntityDeviceSevenLeft.class);
        if (!Helper.isEmptyValue(dlist3)) {
            for (EntityDeviceSevenLeft o : dlist3) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setTheDevice7Left(o.getDevice_seven_left());
            }
        }
        //pcu
        List<EntityPcu> alist = pcuManager.getPcuByAllKind(dateStart, dateEnd);
        if (!Helper.isEmptyValue(alist)) {
            for (EntityPcu o : alist) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setPcu(o.getPcu());
            }
        }
        //acu
        List<EntityAcu> plist = acuManager.getAcuByAllKind(dateStart, dateEnd);
        if (!Helper.isEmptyValue(plist)) {
            for (EntityAcu o : plist) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setAcu(o.getAcu());
            }
        }
        // 有效新增用户数
        List<EntitySevenLoginPercent> list6 = sevenLoginPercentManager.getSevenLoginPercentByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list6)) {
            for (EntitySevenLoginPercent o : list6) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setValidatedNewUser(o.getTwo_login_times());

                // 登录比新增用户有效率
                tmp.setLoginNewUservalidatedRadio(tmp.getNewUser() == 0 ? 0 : (float) (tmp.getValidatedNewUser() * 1.0 / tmp.getNewUser()));

                // 登录比留存用户数
                tmp.setLoginRadioAliveUserCount(o.getThree_login_times());

                // 登录比
                tmp.setLoginRadio(tmp.getValidatedNewUser() == 0 ? 0 : (float) (tmp.getLoginRadioAliveUserCount() * 1.0 / tmp.getValidatedNewUser()));
            }
        }

        // 分日活跃帐号数
        List<EntityDau> list7 = dauManager.getDauByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list7)) {
            for (EntityDau o : list7) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(o.getStartday());
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setActiveUserCountByDay(o.getDau());
            }
        }

        // 活跃帐号总数
        List<EntityDau> list71 = dauManager.getAllDauByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list71)) {
            for (EntityDau o : list71) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(o.getStartday());
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setActiveUserCount(o.getDau());
            }
        }

        // 人均在线时长(m)
        List<EntityDaPlayTime> list8 = daPlayTimeManager.getDaPlayTimeByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list8)) {
            for (EntityDaPlayTime o : list8) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setSumplaytime(o.getSumplaytime());
                tmp.setUseridnum(o.getUseridnum());
                tmp.setAvgOnlineTime((int) o.getDa_playtime());
            }
        }

        // 人均登录次数
        List<EntityDaLoginTime> loginlist = daLoginTimeManager.getDaLoginTimeByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(loginlist)) {
            for (EntityDaLoginTime o : loginlist) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setAvgLoginTime(o.getAveragetimes());
            }
        }

        // 付费金额
        List<EntityTotalCash> list9 = totalCashManager.getTotalCashByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list9)) {
            for (EntityTotalCash o : list9) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }
                tmp.setPayCount(UIHelper.getYuan(o.getTotal_cash()));
            }
        }

        // 分日付费帐号数
        List<EntityPayUser> list10 = payUserManager.getPayUserByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list10)) {
            for (EntityPayUser o : list10) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(o.getStartday());
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setPayUserCountByDay(o.getAddcash_user());
                // 活跃付费率
                tmp.setActivePayRadio(tmp.getActiveUserCountByDay() == 0 ? 0 : (float) (tmp.getPayUserCountByDay() * 1.0 / tmp.getActiveUserCountByDay()));

                // 付费ARPU
                tmp.setPayARPU(tmp.getPayUserCountByDay() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tmp.getPayCount() * 1.0 / tmp.getPayUserCountByDay()));

                // 活跃ARPU
                tmp.setActiveARPU(tmp.getActiveUserCountByDay() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tmp.getPayCount() * 1.0 / tmp.getActiveUserCountByDay()));
            }
        }

        // 付费账号总数
        List<EntityPayUser> list12 = payUserManager.getAllPayUserByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list12)) {
            for (EntityPayUser o : list12) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(o.getStartday());
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setPayUserCount(o.getAddcash_user());
            }
        }

        // 首次付费账号数
        List<EntityFirstPayUser> list11 = firstPayUserManager.getFirstPayUserByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list11)) {
            for (EntityFirstPayUser o : list11) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setFirstPayUserCount(o.getFirstpayuser());
            }
        }

        // LTV
        List<EntityNewUserLTV> list13 = newUserLTVManager.getAllNewUserLTVByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list13)) {
            for (EntityNewUserLTV o : list13) {
                int d = Time.getInterval(Time.formatDate(o.getStartday(), "yyyy-MM-dd"), Time.formatDate(o.getEndday(), "yyyy-MM-dd")) + 1;  // 充值日与创建日相差天数
                if (d == 1 || d == 3 || d == 7 || d == 14 || d == 30 || d == 60 || d == 90 || d == 120) {
                    String key = o.getKey();
                    GameReportData tmp = tmpGRMap.get(key);
                    if (tmp == null) {
                        tmp = new GameReportData();
                        tmp.setDateStr(o.getStartday());
                        tmp.setPlatformId(o.getPlatformid());
                        tmp.setChannelId(o.getChannelid());
                        tmp.setServerId(o.getServerid());
                        tmpGRMap.put(key, tmp);
                    }

                    tmp.setThePayUser(d, UIHelper.getYuan(o.getCashadd()));
                    tmp.setTheLTV(d, UIHelper.getYuan(o.getCashadd()));
                }
            }
        }

        // 二阶登录比
        List<EntityUserTwoStepLoginPercent> list14 = userTwoStepLoginPercentManager.getUserTwoStepLoginPercentByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list14)) {
            for (EntityUserTwoStepLoginPercent o : list14) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setThe3LoginUserNumOfFirstWeek(o.getFirst_week_three_login_num());
                tmp.setThe1LoginUserNumOfSecondWeek(o.getSecond_week_one_login_num());

                // 登录比
                tmp.setLoginRadio2(tmp.getThe3LoginUserNumOfFirstWeek() == 0 ? 0 : (float) (tmp.getThe1LoginUserNumOfSecondWeek() * 1.0 / tmp.getThe3LoginUserNumOfFirstWeek()));
            }
        }

        // 新增账号付费人数
        List<EntityNewUserAddCashUser> list15 = newUserAddCashUserManager.getNewUserAddCashUsersByDate(dateStart, dateEnd);
        if (!Helper.isEmptyValue(list15)) {
            for (EntityNewUserAddCashUser o : list15) {
                String key = o.getKey();
                GameReportData tmp = tmpGRMap.get(key);
                if (tmp == null) {
                    tmp = new GameReportData();
                    tmp.setDateStr(Time.getDateStr(o.getDay()));
                    tmp.setPlatformId(o.getPlatformid());
                    tmp.setChannelId(o.getChannelid());
                    tmp.setServerId(o.getServerid());
                    tmpGRMap.put(key, tmp);
                }

                tmp.setNewPayUserCount(o.getNew_user_addcash_user());
                // 新增帐号付费率
                tmp.setNewUserPayRatio(tmp.getNewUser() == 0 ? 0 : (float) (tmp.getNewPayUserCount() * 1.0 / tmp.getNewUser()));
            }
        }

        // 新增账号付费金额 TODO

        return new ArrayList<>(tmpGRMap.values());
    }

    public void updateData(List<GameReportData> allData, List<GameReportData> platformDataList, List<GameReportData> detailChannelDataList, List<GameReportData> detailServerDataList) {
        Map<String, List<GameReportData>> paltformDataMap = new HashMap<>(); // 平台辅助map
        Map<String, List<GameReportData>> channelDataMap = new HashMap<>(); // 渠道辅助map
        Map<String, List<GameReportData>> serverDataMap = new HashMap<>(); // 区服辅助map

        Set<String> dateSet = new HashSet<>();  // 日期串set
        for (GameReportData oa : allData) {
            dateSet.add(oa.getDateStr());

            if (oa.isAllData() || !"0".equals(oa.getPlatformId())) {  // 全平台或者平台id不为0的，即按平台统计的
                List<GameReportData> oal1 = paltformDataMap.get(oa.getPlatformId());
                if (oal1 == null) {
                    oal1 = new ArrayList<>();
                    paltformDataMap.put(oa.getPlatformId(), oal1);
                }
                oal1.add(oa);
            }

            if (!"0".equals(oa.getChannelId())) {  // 渠道id不为0的
                List<GameReportData> oal2 = channelDataMap.get(oa.getChannelId());
                if (oal2 == null) {
                    oal2 = new ArrayList<>();
                    channelDataMap.put(oa.getChannelId(), oal2);
                }
                oal2.add(oa);
            }

            if (!"0".equals(oa.getServerId())) {  // 区服id不为0
                List<GameReportData> oal3 = serverDataMap.get(oa.getServerId());
                if (oal3 == null) {
                    oal3 = new ArrayList<>();
                    serverDataMap.put(oa.getServerId(), oal3);
                }
                oal3.add(oa);
            }
        }

        // 组装平台数据
        for (Entry<String, List<GameReportData>> entry : paltformDataMap.entrySet()) {
            List<GameReportData> value = entry.getValue();
            Collections.sort(value, new GameReportData().comparatorDate);
            GameReportData oa = new GameReportData();
            oa.setTogglerDatas(value);
            oa.setPlatformId(entry.getKey());
            for (GameReportData o : value) {
                oa.setNewDevice(oa.getNewDevice() + o.getNewDevice());
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setActiveDevice(oa.getActiveDevice() + o.getActiveDevice());
                oa.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + o.getThe2LeftLoginusernum());
                oa.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + o.getThe2LeftUsercreatenum());
                oa.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + o.getThe3LeftLoginusernum());
                oa.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + o.getThe3LeftUsercreatenum());
                oa.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + o.getThe7LeftLoginusernum());
                oa.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + o.getThe7LeftUsercreatenum());
                oa.setThe14LeftLoginusernum(oa.getThe14LeftLoginusernum() + o.getThe14LeftLoginusernum());
                oa.setThe14LeftUsercreatenum(oa.getThe14LeftUsercreatenum() + o.getThe14LeftUsercreatenum());
                oa.setThe30LeftLoginusernum(oa.getThe30LeftLoginusernum() + o.getThe30LeftLoginusernum());
                oa.setThe30LeftUsercreatenum(oa.getThe30LeftUsercreatenum() + o.getThe30LeftUsercreatenum());
                oa.setThe60LeftLoginusernum(oa.getThe60LeftLoginusernum() + o.getThe60LeftLoginusernum());
                oa.setThe60LeftUsercreatenum(oa.getThe60LeftUsercreatenum() + o.getThe60LeftUsercreatenum());
                oa.setThe90LeftLoginusernum(oa.getThe90LeftLoginusernum() + o.getThe90LeftLoginusernum());
                oa.setThe90LeftUsercreatenum(oa.getThe90LeftUsercreatenum() + o.getThe90LeftUsercreatenum());
                oa.setValidatedNewUser(oa.getValidatedNewUser() + o.getValidatedNewUser());
                oa.setLoginRadioAliveUserCount(oa.getLoginRadioAliveUserCount() + o.getLoginRadioAliveUserCount());
                oa.setThe1LoginUserNumOfSecondWeek(oa.getThe1LoginUserNumOfSecondWeek() + o.getThe1LoginUserNumOfSecondWeek());
                oa.setThe3LoginUserNumOfFirstWeek(oa.getThe3LoginUserNumOfFirstWeek() + o.getThe3LoginUserNumOfFirstWeek());
                oa.setActiveUserCount(oa.getActiveUserCount() + o.getActiveUserCount());
                oa.setSumplaytime(oa.getSumplaytime() + o.getSumplaytime());
                oa.setUseridnum(oa.getUseridnum() + o.getUseridnum());
                oa.setAvgOnlineTime(oa.getAvgOnlineTime() + o.getAvgOnlineTime());
                oa.setPayCount(oa.getPayCount() + o.getPayCount());
                oa.setPayUserCount(oa.getPayUserCount() + o.getPayUserCount());
                oa.setFirstPayUserCount(oa.getFirstPayUserCount() + o.getFirstPayUserCount());
                oa.setNewPayUserCount(oa.getNewPayUserCount() + o.getNewPayUserCount());
                oa.setNewUserPayCount(oa.getNewUserPayCount() + o.getNewUserPayCount());
                oa.setThe1ltvNewUser(oa.getThe1ltvNewUser() + o.getThe1ltvNewUser());
                oa.setThe3ltvNewUser(oa.getThe3ltvNewUser() + o.getThe3ltvNewUser());
                oa.setThe7ltvNewUser(oa.getThe7ltvNewUser() + o.getThe7ltvNewUser());
                oa.setThe14ltvNewUser(oa.getThe14ltvNewUser() + o.getThe14ltvNewUser());
                oa.setThe30ltvNewUser(oa.getThe30ltvNewUser() + o.getThe30ltvNewUser());
                oa.setThe60ltvNewUser(oa.getThe60ltvNewUser() + o.getThe60ltvNewUser());
                oa.setThe90ltvNewUser(oa.getThe90ltvNewUser() + o.getThe90ltvNewUser());
                oa.setThe120ltvNewUser(oa.getThe120ltvNewUser() + o.getThe120ltvNewUser());
                oa.setThePayUser(1, oa.getThe1PayUser() + o.getThe1PayUser());
                oa.setThePayUser(3, oa.getThe3PayUser() + o.getThe3PayUser());
                oa.setThePayUser(7, oa.getThe7PayUser() + o.getThe7PayUser());
                oa.setThePayUser(14, oa.getThe14PayUser() + o.getThe14PayUser());
                oa.setThePayUser(30, oa.getThe30PayUser() + o.getThe30PayUser());
                oa.setThePayUser(60, oa.getThe60PayUser() + o.getThe60PayUser());
                oa.setThePayUser(90, oa.getThe90PayUser() + o.getThe90PayUser());
                oa.setThePayUser(120, oa.getThe120PayUser() + o.getThe120PayUser());
            }
            platformDataList.add(oa);
        }
        for (GameReportData tt : platformDataList) {
            tt.setThe2Left(tt.getThe2LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe2LeftLoginusernum() * 1.0 / tt.getThe2LeftUsercreatenum()));
            tt.setThe3Left(tt.getThe3LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe3LeftLoginusernum() * 1.0 / tt.getThe3LeftUsercreatenum()));
            tt.setThe7Left(tt.getThe7LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe7LeftLoginusernum() * 1.0 / tt.getThe7LeftUsercreatenum()));
            tt.setThe14Left(tt.getThe14LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe14LeftLoginusernum() * 1.0 / tt.getThe14LeftUsercreatenum()));
            tt.setThe30Left(tt.getThe30LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe30LeftLoginusernum() * 1.0 / tt.getThe30LeftUsercreatenum()));
            tt.setThe60Left(tt.getThe60LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe60LeftLoginusernum() * 1.0 / tt.getThe60LeftUsercreatenum()));
            tt.setThe90Left(tt.getThe90LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe90LeftLoginusernum() * 1.0 / tt.getThe90LeftUsercreatenum()));
            tt.setLoginNewUservalidatedRadio(tt.getNewUser() == 0 ? 0 : (float) (tt.getValidatedNewUser() * 1.0 / tt.getNewUser()));
            tt.setLoginRadio(tt.getValidatedNewUser() == 0 ? 0 : (float) (tt.getLoginRadioAliveUserCount() * 1.0 / tt.getValidatedNewUser()));
            tt.setLoginRadio2(tt.getThe3LoginUserNumOfFirstWeek() == 0 ? 0 : (float) (tt.getThe1LoginUserNumOfSecondWeek() * 1.0 / tt.getThe3LoginUserNumOfFirstWeek()));
            tt.setAvgOnlineTime((int) (tt.getAvgOnlineTime() * 1.0 / 60));
            tt.setActivePayRadio((float) ((tt.getPayUserCount()) * 1.0 / (tt.getActiveUserCount() == 0 ? 1 : tt.getActiveUserCount())));
            tt.setPayCount(tt.getPayCount());
            tt.setPayARPU(tt.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getPayUserCount()));
            tt.setActiveARPU(tt.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getActiveUserCount()));
            tt.setTheLTV(1, tt.getThe1PayUser());
            tt.setTheLTV(3, tt.getThe3PayUser());
            tt.setTheLTV(7, tt.getThe7PayUser());
            tt.setTheLTV(14, tt.getThe14PayUser());
            tt.setTheLTV(30, tt.getThe30PayUser());
            tt.setTheLTV(60, tt.getThe60PayUser());
            tt.setTheLTV(90, tt.getThe90PayUser());
            tt.setTheLTV(120, tt.getThe120PayUser());
            tt.setNewUserPayRatio(tt.getNewUser() == 0 ? 0 : (float) (tt.getNewPayUserCount() * 1.0 / tt.getNewUser()));
            tt.setActive2NewRadio(tt.getActiveDevice() == 0 ? 0 : (float) (tt.getNewDevice() * 1.0 / tt.getActiveDevice()));
            tt.setNewPayUserARPU(0); // TODO
        }
        Collections.sort(platformDataList, new GameReportData().comparatorPlatformId);

        // 组装渠道数据
        for (Entry<String, List<GameReportData>> entry : channelDataMap.entrySet()) {
            List<GameReportData> value = entry.getValue();
            for (GameReportData tg : value) {
                tg.setPlatformId(BiPlatformManager.CHANNEL_PLATFORM_MAP.get(tg.getChannelId()) != null ? BiPlatformManager.CHANNEL_PLATFORM_MAP.get(tg.getChannelId()) : tg.getPlatformId());
            }
            Collections.sort(value, new GameReportData().comparatorDate);
            GameReportData oa = new GameReportData();
            oa.setTogglerDatas(value);
            oa.setChannelId(entry.getKey());
            oa.setPlatformId(BiPlatformManager.CHANNEL_PLATFORM_MAP.get(entry.getKey()) != null ? BiPlatformManager.CHANNEL_PLATFORM_MAP.get(entry.getKey()) : "0");

            for (GameReportData o : value) {
                oa.setNewDevice(oa.getNewDevice() + o.getNewDevice());
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setActiveDevice(oa.getActiveDevice() + o.getActiveDevice());
                oa.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + o.getThe2LeftLoginusernum());
                oa.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + o.getThe2LeftUsercreatenum());
                oa.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + o.getThe3LeftLoginusernum());
                oa.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + o.getThe3LeftUsercreatenum());
                oa.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + o.getThe7LeftLoginusernum());
                oa.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + o.getThe7LeftUsercreatenum());
                oa.setThe14LeftLoginusernum(oa.getThe14LeftLoginusernum() + o.getThe14LeftLoginusernum());
                oa.setThe14LeftUsercreatenum(oa.getThe14LeftUsercreatenum() + o.getThe14LeftUsercreatenum());
                oa.setThe30LeftLoginusernum(oa.getThe30LeftLoginusernum() + o.getThe30LeftLoginusernum());
                oa.setThe30LeftUsercreatenum(oa.getThe30LeftUsercreatenum() + o.getThe30LeftUsercreatenum());
                oa.setThe60LeftLoginusernum(oa.getThe60LeftLoginusernum() + o.getThe60LeftLoginusernum());
                oa.setThe60LeftUsercreatenum(oa.getThe60LeftUsercreatenum() + o.getThe60LeftUsercreatenum());
                oa.setThe90LeftLoginusernum(oa.getThe90LeftLoginusernum() + o.getThe90LeftLoginusernum());
                oa.setThe90LeftUsercreatenum(oa.getThe90LeftUsercreatenum() + o.getThe90LeftUsercreatenum());
                oa.setValidatedNewUser(oa.getValidatedNewUser() + o.getValidatedNewUser());
                oa.setLoginRadioAliveUserCount(oa.getLoginRadioAliveUserCount() + o.getLoginRadioAliveUserCount());
                oa.setThe1LoginUserNumOfSecondWeek(oa.getThe1LoginUserNumOfSecondWeek() + o.getThe1LoginUserNumOfSecondWeek());
                oa.setThe3LoginUserNumOfFirstWeek(oa.getThe3LoginUserNumOfFirstWeek() + o.getThe3LoginUserNumOfFirstWeek());
                oa.setActiveUserCount(oa.getActiveUserCount() + o.getActiveUserCount());
                oa.setSumplaytime(oa.getSumplaytime() + o.getSumplaytime());
                oa.setUseridnum(oa.getUseridnum() + o.getUseridnum());
                oa.setAvgOnlineTime(oa.getAvgOnlineTime() + o.getAvgOnlineTime());
                oa.setPayCount(oa.getPayCount() + o.getPayCount());
                oa.setPayUserCount(oa.getPayUserCount() + o.getPayUserCount());
                oa.setFirstPayUserCount(oa.getFirstPayUserCount() + o.getFirstPayUserCount());
                oa.setNewPayUserCount(oa.getNewPayUserCount() + o.getNewPayUserCount());
                oa.setNewUserPayCount(oa.getNewUserPayCount() + o.getNewUserPayCount());
                oa.setThe1ltvNewUser(oa.getThe1ltvNewUser() + o.getThe1ltvNewUser());
                oa.setThe3ltvNewUser(oa.getThe3ltvNewUser() + o.getThe3ltvNewUser());
                oa.setThe7ltvNewUser(oa.getThe7ltvNewUser() + o.getThe7ltvNewUser());
                oa.setThe14ltvNewUser(oa.getThe14ltvNewUser() + o.getThe14ltvNewUser());
                oa.setThe30ltvNewUser(oa.getThe30ltvNewUser() + o.getThe30ltvNewUser());
                oa.setThe60ltvNewUser(oa.getThe60ltvNewUser() + o.getThe60ltvNewUser());
                oa.setThe90ltvNewUser(oa.getThe90ltvNewUser() + o.getThe90ltvNewUser());
                oa.setThe120ltvNewUser(oa.getThe120ltvNewUser() + o.getThe120ltvNewUser());
                oa.setThePayUser(1, oa.getThe1PayUser() + o.getThe1PayUser());
                oa.setThePayUser(3, oa.getThe3PayUser() + o.getThe3PayUser());
                oa.setThePayUser(7, oa.getThe7PayUser() + o.getThe7PayUser());
                oa.setThePayUser(14, oa.getThe14PayUser() + o.getThe14PayUser());
                oa.setThePayUser(30, oa.getThe30PayUser() + o.getThe30PayUser());
                oa.setThePayUser(60, oa.getThe60PayUser() + o.getThe60PayUser());
                oa.setThePayUser(90, oa.getThe90PayUser() + o.getThe90PayUser());
                oa.setThePayUser(120, oa.getThe120PayUser() + o.getThe120PayUser());
            }

            detailChannelDataList.add(oa);
        }
        for (GameReportData tt : detailChannelDataList) {
            tt.setThe2Left(tt.getThe2LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe2LeftLoginusernum() * 1.0 / tt.getThe2LeftUsercreatenum()));
            tt.setThe3Left(tt.getThe3LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe3LeftLoginusernum() * 1.0 / tt.getThe3LeftUsercreatenum()));
            tt.setThe7Left(tt.getThe7LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe7LeftLoginusernum() * 1.0 / tt.getThe7LeftUsercreatenum()));
            tt.setThe14Left(tt.getThe14LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe14LeftLoginusernum() * 1.0 / tt.getThe14LeftUsercreatenum()));
            tt.setThe30Left(tt.getThe30LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe30LeftLoginusernum() * 1.0 / tt.getThe30LeftUsercreatenum()));
            tt.setThe60Left(tt.getThe60LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe60LeftLoginusernum() * 1.0 / tt.getThe60LeftUsercreatenum()));
            tt.setThe90Left(tt.getThe90LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe90LeftLoginusernum() * 1.0 / tt.getThe90LeftUsercreatenum()));
            tt.setLoginNewUservalidatedRadio(tt.getNewUser() == 0 ? 0 : (float) (tt.getValidatedNewUser() * 1.0 / tt.getNewUser()));
            tt.setLoginRadio(tt.getValidatedNewUser() == 0 ? 0 : (float) (tt.getLoginRadioAliveUserCount() * 1.0 / tt.getValidatedNewUser()));
            tt.setLoginRadio2(tt.getThe3LoginUserNumOfFirstWeek() == 0 ? 0 : (float) (tt.getThe1LoginUserNumOfSecondWeek() * 1.0 / tt.getThe3LoginUserNumOfFirstWeek()));
            tt.setAvgOnlineTime(tt.getTogglerDatas().size() == 0 ? 0 : tt.getAvgOnlineTime() / 60 / tt.getTogglerDatas().size());
            tt.setActivePayRadio(tt.getActiveUserCount() == 0 ? 0 : (float) ((tt.getPayUserCount()) * 1.0 / tt.getActiveUserCount()));
            tt.setPayCount(tt.getPayCount());
            tt.setPayARPU(tt.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getPayUserCount()));
            tt.setActiveARPU(tt.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getActiveUserCount()));
            tt.setTheLTV(1, tt.getThe1PayUser());
            tt.setTheLTV(3, tt.getThe3PayUser());
            tt.setTheLTV(7, tt.getThe7PayUser());
            tt.setTheLTV(14, tt.getThe14PayUser());
            tt.setTheLTV(30, tt.getThe30PayUser());
            tt.setTheLTV(60, tt.getThe60PayUser());
            tt.setTheLTV(90, tt.getThe90PayUser());
            tt.setTheLTV(120, tt.getThe120PayUser());
            tt.setNewUserPayRatio(tt.getNewUser() == 0 ? 0 : (float) (tt.getNewPayUserCount() * 1.0 / tt.getNewUser()));
            tt.setActive2NewRadio(tt.getActiveDevice() == 0 ? 0 : (float) (tt.getNewDevice() * 1.0 / tt.getActiveDevice()));
            tt.setNewPayUserARPU(0); // TODO
        }
        Collections.sort(detailChannelDataList, new GameReportData().comparatorChannelName);

        // 组装区服数据
        for (Entry<String, List<GameReportData>> entry : serverDataMap.entrySet()) {
            List<GameReportData> value = entry.getValue();
            for (GameReportData tg : value) {
                String serverType = BiPlatformManager.getServerType(entry.getKey()) == null ? "" : BiPlatformManager.getServerType(entry.getKey());
                String serverTypeName = BossRealTimeManager.INDEX2NAME.get(serverType) == null ? "" : BossRealTimeManager.INDEX2NAME.get(serverType);
                tg.setServerTypeName(serverTypeName);
            }
            Collections.sort(value, new GameReportData().comparatorDate);
            GameReportData oa = new GameReportData();
            oa.setTogglerDatas(value);
            oa.setServerId(entry.getKey());
            String serverType = BiPlatformManager.getServerType(entry.getKey()) == null ? "" : BiPlatformManager.getServerType(entry.getKey());
            String serverTypeName = BossRealTimeManager.INDEX2NAME.get(serverType) == null ? "" : BossRealTimeManager.INDEX2NAME.get(serverType);
            oa.setServerTypeName(serverTypeName);

            /*for (GameReportData o : value) {
                oa.setNewDevice(oa.getNewDevice() + o.getNewDevice());
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + o.getThe2LeftLoginusernum());
                oa.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + o.getThe2LeftUsercreatenum());
                oa.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + o.getThe3LeftLoginusernum());
                oa.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + o.getThe3LeftUsercreatenum());
                oa.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + o.getThe7LeftLoginusernum());
                oa.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + o.getThe7LeftUsercreatenum());
                oa.setThe14LeftLoginusernum(oa.getThe14LeftLoginusernum() + o.getThe14LeftLoginusernum());
                oa.setThe14LeftUsercreatenum(oa.getThe14LeftUsercreatenum() + o.getThe14LeftUsercreatenum());
                oa.setThe30LeftLoginusernum(oa.getThe30LeftLoginusernum() + o.getThe30LeftLoginusernum());
                oa.setThe30LeftUsercreatenum(oa.getThe30LeftUsercreatenum() + o.getThe30LeftUsercreatenum());
                oa.setValidatedNewUser(oa.getValidatedNewUser() + o.getValidatedNewUser());
                oa.setLoginRadioAliveUserCount(oa.getLoginRadioAliveUserCount() + o.getLoginRadioAliveUserCount());
                oa.setActiveUserCount(oa.getActiveUserCount() + o.getActiveUserCount());
                oa.setSumplaytime(oa.getSumplaytime() + o.getSumplaytime());
                oa.setUseridnum(oa.getUseridnum() + o.getUseridnum());
                oa.setAvgOnlineTime(oa.getAvgOnlineTime() + o.getAvgOnlineTime());
                oa.setPayCount(oa.getPayCount() + o.getPayCount());
                oa.setPayUserCount(oa.getPayUserCount() + o.getPayUserCount());
                oa.setFirstPayUserCount(oa.getFirstPayUserCount() + o.getFirstPayUserCount());
                oa.setNewPayUserCount(oa.getNewPayUserCount() + o.getNewPayUserCount());
                oa.setNewUserPayCount(oa.getNewUserPayCount() + o.getNewUserPayCount());
                oa.setThe7ltvNewUser(oa.getThe7ltvNewUser() + o.getThe7ltvNewUser());
                oa.setThe14ltvNewUser(oa.getThe14ltvNewUser() + o.getThe14ltvNewUser());
                oa.setThe30ltvNewUser(oa.getThe30ltvNewUser() + o.getThe30ltvNewUser());
                oa.setThePayUser(7, oa.getThe7PayUser() + o.getThe7PayUser());
                oa.setThePayUser(14, oa.getThe14PayUser() + o.getThe14PayUser());
                oa.setThePayUser(30, oa.getThe30PayUser() + o.getThe30PayUser());
            }*/
            detailServerDataList.add(oa);
        }
        /*for (GameReportData tt : detailServerDataList) {
            tt.setThe2Left((float) (tt.getThe2LeftLoginusernum() * 1.0 / (tt.getThe2LeftUsercreatenum() == 0 ? 1 : tt.getThe2LeftUsercreatenum())));
            tt.setThe3Left((float) (tt.getThe3LeftLoginusernum() * 1.0 / (tt.getThe3LeftUsercreatenum() == 0 ? 1 : tt.getThe3LeftUsercreatenum())));
            tt.setThe7Left((float) (tt.getThe7LeftLoginusernum() * 1.0 / (tt.getThe7LeftUsercreatenum() == 0 ? 1 : tt.getThe7LeftUsercreatenum())));
            tt.setThe14Left((float) (tt.getThe14LeftLoginusernum() * 1.0 / (tt.getThe14LeftUsercreatenum() == 0 ? 1 : tt.getThe14LeftUsercreatenum())));
            tt.setThe30Left((float) (tt.getThe30LeftLoginusernum() * 1.0 / (tt.getThe30LeftUsercreatenum() == 0 ? 1 : tt.getThe30LeftUsercreatenum())));
            tt.setLoginNewUservalidatedRadio((float) (tt.getValidatedNewUser() * 1.0 / (tt.getNewUser() == 0 ? 1 : tt.getNewUser())));
            tt.setLoginRadio((float) (tt.getLoginRadioAliveUserCount() * 1.0 / (tt.getValidatedNewUser() == 0 ? 1 : tt.getValidatedNewUser())));
            tt.setAvgOnlineTime(tt.getTogglerDatas().size() == 0 ? 0 : tt.getAvgOnlineTime() / 60 / tt.getTogglerDatas().size());
            tt.setActivePayRadio((float) ((tt.getPayUserCount()) * 1.0 / (tt.getActiveUserCount() == 0 ? 1 : tt.getActiveUserCount())));
            tt.setPayCount(tt.getPayCount());
            tt.setPayARPU(tt.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getPayUserCount()));
            tt.setActiveARPU(tt.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getActiveUserCount()));
            tt.setTheLTV(7, tt.getThe7PayUser());
            tt.setTheLTV(14, tt.getThe14PayUser());
            tt.setTheLTV(30, tt.getThe30PayUser());
            tt.setNewUserPayRatio((float) (0.0)); // TODO
            tt.setNewPayUserARPU(0); // TODO
        }*/
        Collections.sort(detailServerDataList, new GameReportData().comparatorServer);
    }

    /**
     * 根据allData根据前端显示需要的其它数据
     *
     * @param allData
     * @param overviewData
     * @param platformDataList
     * @param channelDataList
     * @param serverDataList
     * @param pieChartList
     * @param lineChart
     */
    public void updateUIData(List<GameReportData> allData, GameReportData overviewData, List<GameReportData> platformDataList, List<GameReportData> platformDataList2, List<GameReportData> channelDataList, List<GameReportData> serverDataList,
                             List<LineChartData> lineChartDataList, List<ChartUIData> pieChartList, ChartUIData lineChart) {
        Map<String, List<GameReportData>> tmp1 = new HashMap<String, List<GameReportData>>(); // 平台1
        Map<String, List<GameReportData>> tmp11 = new HashMap<String, List<GameReportData>>(); // 平台2
        Map<String, List<GameReportData>> tmp2 = new HashMap<String, List<GameReportData>>(); // 渠道
        Map<String, List<GameReportData>> tmp3 = new HashMap<String, List<GameReportData>>(); // 区服
        Map<String, List<GameReportData>> tmp4 = new HashMap<String, List<GameReportData>>(); // 曲线图

        Set<String> dateSet = new HashSet<>();  // 日期串set
        for (GameReportData oa : allData) {
            dateSet.add(oa.getDateStr());

            if (oa.isAllData()) {
                overviewData.setNewDevice(oa.getNewDevice() + overviewData.getNewDevice());
                overviewData.setNewUser(oa.getNewUser() + overviewData.getNewUser());
                overviewData.setActiveDevice(oa.getActiveDevice() + overviewData.getActiveDevice());
                /*
                 * overviewData.setThe2Left((float)(Math.round((oa.getThe2Left()
				 * + overviewData.getThe2Left()) * 100) / 100));
				 * overviewData.setThe3Left((float)(Math.round((oa.getThe3Left()
				 * + overviewData.getThe3Left()) * 100) / 100));
				 * overviewData.setThe7Left((float)(Math.round((oa.getThe7Left()
				 * + overviewData.getThe7Left()) * 100) / 100));
				 * overviewData.setThe14Left
				 * ((float)(Math.round((oa.getThe14Left() +
				 * overviewData.getThe14Left()) * 100) / 100));
				 * overviewData.setThe30Left
				 * ((float)(Math.round((oa.getThe30Left() +
				 * overviewData.getThe30Left()) * 100) / 100));
				 */
                overviewData.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + overviewData.getThe2LeftLoginusernum());
                overviewData.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + overviewData.getThe2LeftUsercreatenum());
                overviewData.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + overviewData.getThe3LeftLoginusernum());
                overviewData.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + overviewData.getThe3LeftUsercreatenum());
                overviewData.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + overviewData.getThe7LeftLoginusernum());
                overviewData.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + overviewData.getThe7LeftUsercreatenum());
                overviewData.setThe14LeftLoginusernum(oa.getThe14LeftLoginusernum() + overviewData.getThe14LeftLoginusernum());
                overviewData.setThe14LeftUsercreatenum(oa.getThe14LeftUsercreatenum() + overviewData.getThe14LeftUsercreatenum());
                overviewData.setThe30LeftLoginusernum(oa.getThe30LeftLoginusernum() + overviewData.getThe30LeftLoginusernum());
                overviewData.setThe30LeftUsercreatenum(oa.getThe30LeftUsercreatenum() + overviewData.getThe30LeftUsercreatenum());
                overviewData.setThe60LeftLoginusernum(oa.getThe60LeftLoginusernum() + overviewData.getThe60LeftLoginusernum());
                overviewData.setThe60LeftUsercreatenum(oa.getThe60LeftUsercreatenum() + overviewData.getThe60LeftUsercreatenum());
                overviewData.setThe90LeftLoginusernum(oa.getThe90LeftLoginusernum() + overviewData.getThe90LeftLoginusernum());
                overviewData.setThe90LeftUsercreatenum(oa.getThe90LeftUsercreatenum() + overviewData.getThe90LeftUsercreatenum());
                overviewData.setValidatedNewUser(oa.getValidatedNewUser() + overviewData.getValidatedNewUser());
                // overviewData.setLoginNewUservalidatedRadio((float)(Math.round((oa.getThe2Left()
                // + overviewData.getThe2Left()) * 100) / 100));
                overviewData.setLoginRadioAliveUserCount(oa.getLoginRadioAliveUserCount() + overviewData.getLoginRadioAliveUserCount());
                // overviewData.setLoginRadio((float)(Math.round((oa.getLoginRadio()
                // + overviewData.getLoginRadio()) * 100) / 100));
                overviewData.setActiveUserCount(oa.getActiveUserCount() + overviewData.getActiveUserCount());
                // overviewData.setAvgOnlineTime(oa.getAvgOnlineTime() +
                // overviewData.getAvgOnlineTime());
                overviewData.setSumplaytime(oa.getSumplaytime() + overviewData.getSumplaytime());
                overviewData.setUseridnum(oa.getUseridnum() + overviewData.getUseridnum());
                overviewData.setAvgOnlineTime(oa.getAvgOnlineTime() + overviewData.getAvgOnlineTime());
                overviewData.setPayCount(oa.getPayCount() + overviewData.getPayCount());
                overviewData.setPayUserCount(oa.getPayUserCount() + overviewData.getPayUserCount());
                overviewData.setFirstPayUserCount(oa.getFirstPayUserCount() + overviewData.getFirstPayUserCount());
                // overviewData.setActivePayRadio(oa.getActivePayRadio() +
                // overviewData.getActivePayRadio());
                // overviewData.setPayARPU(oa.getPayARPU() +
                // overviewData.getPayARPU());
                // overviewData.setActiveARPU(oa.getActiveARPU() +
                // overviewData.getActiveARPU());
                overviewData.setNewPayUserCount(oa.getNewPayUserCount() + overviewData.getNewPayUserCount());
                overviewData.setNewUserPayCount(oa.getNewUserPayCount() + overviewData.getNewUserPayCount());
                // overviewData.setNewUserPayRatio((float)(Math.round((oa.getNewUserPayRatio()
                // + overviewData.getNewUserPayRatio()) * 100) / 100));
                // overviewData.setNewPayUserARPU(oa.getNewPayUserARPU() +
                // overviewData.getNewPayUserARPU());
                overviewData.setThe1ltvNewUser(oa.getThe1ltvNewUser() + overviewData.getThe1ltvNewUser());
                overviewData.setThe3ltvNewUser(oa.getThe3ltvNewUser() + overviewData.getThe3ltvNewUser());
                overviewData.setThe7ltvNewUser(oa.getThe7ltvNewUser() + overviewData.getThe7ltvNewUser());
                overviewData.setThe14ltvNewUser(oa.getThe14ltvNewUser() + overviewData.getThe14ltvNewUser());
                overviewData.setThe30ltvNewUser(oa.getThe30ltvNewUser() + overviewData.getThe30ltvNewUser());
                overviewData.setThe60ltvNewUser(oa.getThe60ltvNewUser() + overviewData.getThe60ltvNewUser());
                overviewData.setThe90ltvNewUser(oa.getThe90ltvNewUser() + overviewData.getThe90ltvNewUser());
                overviewData.setThe120ltvNewUser(oa.getThe120ltvNewUser() + overviewData.getThe120ltvNewUser());
                //overviewData.setNewUser(oa.getNewUser() + overviewData.getNewUser());
                //overviewData.setNewUser(oa.getNewUser() + overviewData.getNewUser());
                overviewData.setThe1PayUser(oa.getThe1PayUser() + overviewData.getThe1PayUser());
                overviewData.setThe3PayUser(oa.getThe3PayUser() + overviewData.getThe3PayUser());
                overviewData.setThe7PayUser(oa.getThe7PayUser() + overviewData.getThe7PayUser());
                overviewData.setThe14PayUser(oa.getThe14PayUser() + overviewData.getThe14PayUser());
                overviewData.setThe30PayUser(oa.getThe30PayUser() + overviewData.getThe30PayUser());
                overviewData.setThe60PayUser(oa.getThe60PayUser() + overviewData.getThe60PayUser());
                overviewData.setThe90PayUser(oa.getThe90PayUser() + overviewData.getThe90PayUser());
                overviewData.setThe120PayUser(oa.getThe120PayUser() + overviewData.getThe120PayUser());
                // overviewData.setThe7LTV(oa.getThe7LTV() + overviewData.getThe7LTV());
                // overviewData.setThe14LTV(oa.getThe14LTV() + overviewData.getThe14LTV());
                // overviewData.setThe30LTV(oa.getThe30LTV() + overviewData.getThe30LTV());
            }

            if (oa.isAllData()) {
                // 平台数据1是日期相同的加一起
                List<GameReportData> oal1 = tmp1.get(oa.getDateStr());
                if (oal1 == null) {
                    oal1 = new ArrayList<GameReportData>();
                    tmp1.put(oa.getDateStr(), oal1);
                }
                oal1.add(oa);
            }

            // 平台数据2是平台和日期相同的加一起
            if (!"0".equals(oa.getPlatformId())) {
                List<GameReportData> oal11 = tmp11.get(oa.getPlatformId());
                if (oal11 == null) {
                    oal11 = new ArrayList<GameReportData>();
                    tmp11.put(oa.getPlatformId(), oal11);
                }
                oal11.add(oa);
            }

            // 渠道数据是渠道相同的加一起
            if (!"0".equals(oa.getChannelId())) {
                List<GameReportData> oal2 = tmp2.get(oa.getChannelId());
                if (oal2 == null) {
                    oal2 = new ArrayList<GameReportData>();
                    tmp2.put(oa.getChannelId(), oal2);
                }
                oal2.add(oa);

                // 曲线图是日期和渠道相同的加一起
                List<GameReportData> oal4 = tmp4.get(oa.getDateStr() + "@" + oa.getChannelId());
                if (oal4 == null) {
                    oal4 = new ArrayList<GameReportData>();
                    tmp4.put(oa.getDateStr() + "@" + oa.getChannelId(), oal4);
                }
                oal4.add(oa);
            }

            // 区服数据是区服相同的加一起
            if (!"0".equals(oa.getServerId())) {
                List<GameReportData> oal3 = tmp3.get(oa.getServerId());
                if (oal3 == null) {
                    oal3 = new ArrayList<GameReportData>();
                    tmp3.put(oa.getServerId(), oal3);
                }
                oal3.add(oa);
            }
        }
        overviewData.setThe2Left((float) (overviewData.getThe2LeftLoginusernum() * 1.0 / (overviewData.getThe2LeftUsercreatenum() == 0 ? 1 : overviewData.getThe2LeftUsercreatenum())));
        overviewData.setThe3Left((float) (overviewData.getThe3LeftLoginusernum() * 1.0 / (overviewData.getThe3LeftUsercreatenum() == 0 ? 1 : overviewData.getThe3LeftUsercreatenum())));
        overviewData.setThe7Left((float) (overviewData.getThe7LeftLoginusernum() * 1.0 / (overviewData.getThe7LeftUsercreatenum() == 0 ? 1 : overviewData.getThe7LeftUsercreatenum())));
        overviewData.setThe14Left((float) (overviewData.getThe14LeftLoginusernum() * 1.0 / (overviewData.getThe14LeftUsercreatenum() == 0 ? 1 : overviewData.getThe14LeftUsercreatenum())));
        overviewData.setThe30Left((float) (overviewData.getThe30LeftLoginusernum() * 1.0 / (overviewData.getThe30LeftUsercreatenum() == 0 ? 1 : overviewData.getThe30LeftUsercreatenum())));
        overviewData.setThe60Left((float) (overviewData.getThe60LeftLoginusernum() * 1.0 / (overviewData.getThe60LeftUsercreatenum() == 0 ? 1 : overviewData.getThe60LeftUsercreatenum())));
        overviewData.setThe90Left((float) (overviewData.getThe90LeftLoginusernum() * 1.0 / (overviewData.getThe90LeftUsercreatenum() == 0 ? 1 : overviewData.getThe90LeftUsercreatenum())));
        overviewData.setLoginNewUservalidatedRadio((float) (overviewData.getValidatedNewUser() * 1.0 / (overviewData.getNewUser() == 0 ? 1 : overviewData.getNewUser())));
        overviewData.setLoginRadio((float) (overviewData.getLoginRadioAliveUserCount() * 1.0 / (overviewData.getValidatedNewUser() == 0 ? 1 : overviewData.getValidatedNewUser())));
        overviewData.setAvgOnlineTime(dateSet.size() <= 0 ? 0 : ((int) (overviewData.getAvgOnlineTime() / dateSet.size() / 60)));
        overviewData.setActivePayRadio((float) ((overviewData.getPayUserCount()) * 1.0 / (overviewData.getActiveUserCount() == 0 ? 1 : overviewData.getActiveUserCount())));
        overviewData.setPayCount(overviewData.getPayCount());
        overviewData.setPayARPU(overviewData.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(overviewData.getPayCount() * 1.0 / overviewData.getPayUserCount()));
        overviewData.setActiveARPU(overviewData.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(overviewData.getPayCount() * 1.0 / overviewData.getActiveUserCount()));
        overviewData.setTheLTV(1, overviewData.getThe1PayUser());
        overviewData.setTheLTV(3, overviewData.getThe3PayUser());
        overviewData.setTheLTV(7, overviewData.getThe7PayUser());
        overviewData.setTheLTV(14, overviewData.getThe14PayUser());
        overviewData.setTheLTV(30, overviewData.getThe30PayUser());
        overviewData.setTheLTV(60, overviewData.getThe60PayUser());
        overviewData.setTheLTV(90, overviewData.getThe90PayUser());
        overviewData.setTheLTV(120, overviewData.getThe120PayUser());
        overviewData.setNewUserPayRatio(overviewData.getNewUser() == 0 ? 0 : (float) (overviewData.getNewPayUserCount() * 1.0 / overviewData.getNewUser()));
        overviewData.setActive2NewRadio(overviewData.getActiveDevice() == 0 ? 0 : (float) (overviewData.getNewDevice() * 1.0 / overviewData.getActiveDevice()));
        overviewData.setNewPayUserARPU(0); // TODO

        // 组装供前端展示的平台数据1
        for (Entry<String, List<GameReportData>> entry : tmp1.entrySet()) {
            List<GameReportData> value = entry.getValue();
            GameReportData oa = new GameReportData();
            oa.setDateStr(entry.getKey());
            for (GameReportData o : value) {
                oa.setNewDevice(oa.getNewDevice() + o.getNewDevice());
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setActiveDevice(oa.getActiveDevice() + o.getActiveDevice());
				/*
				 * oa.setThe2Left((float)(Math.round((oa.getThe2Left() +
				 * o.getThe2Left()) * 100) / 100));
				 * oa.setThe3Left((float)(Math.round((oa.getThe3Left() +
				 * o.getThe3Left()) * 100) / 100));
				 * oa.setThe7Left((float)(Math.round((oa.getThe7Left() +
				 * o.getThe7Left()) * 100) / 100));
				 * oa.setThe14Left((float)(Math.round((oa.getThe14Left() +
				 * o.getThe14Left()) * 100) / 100));
				 * oa.setThe30Left((float)(Math.round((oa.getThe30Left() +
				 * o.getThe30Left()) * 100) / 100));
				 */
                oa.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + o.getThe2LeftLoginusernum());
                oa.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + o.getThe2LeftUsercreatenum());
                oa.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + o.getThe3LeftLoginusernum());
                oa.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + o.getThe3LeftUsercreatenum());
                oa.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + o.getThe7LeftLoginusernum());
                oa.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + o.getThe7LeftUsercreatenum());
                oa.setThe14LeftLoginusernum(oa.getThe14LeftLoginusernum() + o.getThe14LeftLoginusernum());
                oa.setThe14LeftUsercreatenum(oa.getThe14LeftUsercreatenum() + o.getThe14LeftUsercreatenum());
                oa.setThe30LeftLoginusernum(oa.getThe30LeftLoginusernum() + o.getThe30LeftLoginusernum());
                oa.setThe30LeftUsercreatenum(oa.getThe30LeftUsercreatenum() + o.getThe30LeftUsercreatenum());
                oa.setThe60LeftLoginusernum(oa.getThe60LeftLoginusernum() + o.getThe60LeftLoginusernum());
                oa.setThe60LeftUsercreatenum(oa.getThe60LeftUsercreatenum() + o.getThe60LeftUsercreatenum());
                oa.setThe90LeftLoginusernum(oa.getThe90LeftLoginusernum() + o.getThe90LeftLoginusernum());
                oa.setThe90LeftUsercreatenum(oa.getThe90LeftUsercreatenum() + o.getThe90LeftUsercreatenum());
                oa.setValidatedNewUser(oa.getValidatedNewUser() + o.getValidatedNewUser());
                // oa.setLoginNewUservalidatedRadio((float)(Math.round((oa.getThe2Left()
                // + o.getThe2Left()) * 100) / 100));
                oa.setLoginRadioAliveUserCount(oa.getLoginRadioAliveUserCount() + o.getLoginRadioAliveUserCount());
                // oa.setLoginRadio((float)(Math.round((oa.getLoginRadio() +
                // o.getLoginRadio()) * 100) / 100));
                oa.setActiveUserCount(oa.getActiveUserCountByDay() + o.getActiveUserCountByDay());  // mmm
                // oa.setAvgOnlineTime(oa.getAvgOnlineTime() +
                // o.getAvgOnlineTime());
                oa.setSumplaytime(oa.getSumplaytime() + o.getSumplaytime());
                oa.setUseridnum(oa.getUseridnum() + o.getUseridnum());
                oa.setAvgOnlineTime(oa.getAvgOnlineTime() + o.getAvgOnlineTime());
                oa.setPayCount(oa.getPayCount() + o.getPayCount());
                oa.setPayUserCount(oa.getPayUserCountByDay() + o.getPayUserCountByDay());
                oa.setFirstPayUserCount(oa.getFirstPayUserCount() + o.getFirstPayUserCount());
                // oa.setActivePayRadio(oa.getActivePayRadio() +
                // o.getActivePayRadio());
                // oa.setPayARPU(oa.getPayARPU() + o.getPayARPU());
                // oa.setActiveARPU(oa.getActiveARPU() + o.getActiveARPU());
                oa.setNewPayUserCount(oa.getNewPayUserCount() + o.getNewPayUserCount());
                oa.setNewUserPayCount(oa.getNewUserPayCount() + o.getNewUserPayCount());
                // oa.setNewUserPayRatio((float)(Math.round((oa.getNewUserPayRatio()
                // + o.getNewUserPayRatio()) * 100) / 100));
                // oa.setNewPayUserARPU(oa.getNewPayUserARPU() +
                // o.getNewPayUserARPU());
                oa.setThe1ltvNewUser(oa.getThe1ltvNewUser() + o.getThe1ltvNewUser());
                oa.setThe3ltvNewUser(oa.getThe3ltvNewUser() + o.getThe3ltvNewUser());
                oa.setThe7ltvNewUser(oa.getThe7ltvNewUser() + o.getThe7ltvNewUser());
                oa.setThe14ltvNewUser(oa.getThe14ltvNewUser() + o.getThe14ltvNewUser());
                oa.setThe30ltvNewUser(oa.getThe30ltvNewUser() + o.getThe30ltvNewUser());
                oa.setThe60ltvNewUser(oa.getThe60ltvNewUser() + o.getThe60ltvNewUser());
                oa.setThe90ltvNewUser(oa.getThe90ltvNewUser() + o.getThe90ltvNewUser());
                oa.setThe120ltvNewUser(oa.getThe120ltvNewUser() + o.getThe120ltvNewUser());
                oa.setThePayUser(1, oa.getThe1PayUser() + o.getThe1PayUser());
                oa.setThePayUser(3, oa.getThe3PayUser() + o.getThe3PayUser());
                oa.setThePayUser(7, oa.getThe7PayUser() + o.getThe7PayUser());
                oa.setThePayUser(14, oa.getThe14PayUser() + o.getThe14PayUser());
                oa.setThePayUser(30, oa.getThe30PayUser() + o.getThe30PayUser());
                oa.setThePayUser(60, oa.getThe60PayUser() + o.getThe60PayUser());
                oa.setThePayUser(90, oa.getThe90PayUser() + o.getThe90PayUser());
                oa.setThePayUser(120, oa.getThe120PayUser() + o.getThe120PayUser());
            }
            platformDataList.add(oa);
        }
        for (GameReportData tt : platformDataList) {
            tt.setThe2Left((float) (tt.getThe2LeftLoginusernum() * 1.0 / (tt.getThe2LeftUsercreatenum() == 0 ? 1 : tt.getThe2LeftUsercreatenum())));
            tt.setThe3Left((float) (tt.getThe3LeftLoginusernum() * 1.0 / (tt.getThe3LeftUsercreatenum() == 0 ? 1 : tt.getThe3LeftUsercreatenum())));
            tt.setThe7Left((float) (tt.getThe7LeftLoginusernum() * 1.0 / (tt.getThe7LeftUsercreatenum() == 0 ? 1 : tt.getThe7LeftUsercreatenum())));
            tt.setThe14Left((float) (tt.getThe14LeftLoginusernum() * 1.0 / (tt.getThe14LeftUsercreatenum() == 0 ? 1 : tt.getThe14LeftUsercreatenum())));
            tt.setThe30Left((float) (tt.getThe30LeftLoginusernum() * 1.0 / (tt.getThe30LeftUsercreatenum() == 0 ? 1 : tt.getThe30LeftUsercreatenum())));
            tt.setThe60Left(tt.getThe60LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe60LeftLoginusernum() * 1.0 / tt.getThe60LeftUsercreatenum()));
            tt.setThe90Left(tt.getThe90LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe90LeftLoginusernum() * 1.0 / tt.getThe90LeftUsercreatenum()));
            tt.setLoginNewUservalidatedRadio((float) (tt.getValidatedNewUser() * 1.0 / (tt.getNewUser() == 0 ? 1 : tt.getNewUser())));
            tt.setLoginRadio((float) (tt.getLoginRadioAliveUserCount() * 1.0 / (tt.getValidatedNewUser() == 0 ? 1 : tt.getValidatedNewUser())));
            tt.setAvgOnlineTime((int) (tt.getAvgOnlineTime() / 60));
            tt.setActivePayRadio((float) ((tt.getPayUserCount()) * 1.0 / (tt.getActiveUserCount() == 0 ? 1 : tt.getActiveUserCount())));
            tt.setPayCount(tt.getPayCount());
            tt.setPayARPU(tt.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getPayUserCount()));
            tt.setActiveARPU(tt.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getActiveUserCount()));

            tt.setTheLTV(1, tt.getThe1PayUser());
            tt.setTheLTV(3, tt.getThe3PayUser());
            tt.setTheLTV(7, tt.getThe7PayUser());
            tt.setTheLTV(14, tt.getThe14PayUser());
            tt.setTheLTV(30, tt.getThe30PayUser());
            tt.setTheLTV(60, tt.getThe60PayUser());
            tt.setTheLTV(90, tt.getThe90PayUser());
            tt.setTheLTV(120, tt.getThe120PayUser());
            tt.setNewUserPayRatio(tt.getNewUser() == 0 ? 0 : (float) (tt.getNewPayUserCount() * 1.0 / tt.getNewUser()));
            tt.setActive2NewRadio(tt.getActiveDevice() == 0 ? 0 : (float) (tt.getNewDevice() * 1.0 / tt.getActiveDevice()));
            tt.setNewPayUserARPU(0); // TODO
        }
        Collections.sort(platformDataList, overviewData.comparatorDate);

        // 组装供前端展示的平台数据2
        for (Entry<String, List<GameReportData>> entry : tmp11.entrySet()) {
            List<GameReportData> value = entry.getValue();
            Collections.sort(value, overviewData.comparatorDate);
            GameReportData oa = new GameReportData();
            oa.setTogglerDatas(value);
            oa.setPlatformId(entry.getKey());
            for (GameReportData o : value) {
                oa.setNewDevice(oa.getNewDevice() + o.getNewDevice());
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setActiveDevice(oa.getActiveDevice() + o.getActiveDevice());
				/*
				 * oa.setThe2Left((float)(Math.round((oa.getThe2Left() +
				 * o.getThe2Left()) * 100) / 100));
				 * oa.setThe3Left((float)(Math.round((oa.getThe3Left() +
				 * o.getThe3Left()) * 100) / 100));
				 * oa.setThe7Left((float)(Math.round((oa.getThe7Left() +
				 * o.getThe7Left()) * 100) / 100));
				 * oa.setThe14Left((float)(Math.round((oa.getThe14Left() +
				 * o.getThe14Left()) * 100) / 100));
				 * oa.setThe30Left((float)(Math.round((oa.getThe30Left() +
				 * o.getThe30Left()) * 100) / 100));
				 */
                oa.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + o.getThe2LeftLoginusernum());
                oa.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + o.getThe2LeftUsercreatenum());
                oa.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + o.getThe3LeftLoginusernum());
                oa.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + o.getThe3LeftUsercreatenum());
                oa.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + o.getThe7LeftLoginusernum());
                oa.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + o.getThe7LeftUsercreatenum());
                oa.setThe14LeftLoginusernum(oa.getThe14LeftLoginusernum() + o.getThe14LeftLoginusernum());
                oa.setThe14LeftUsercreatenum(oa.getThe14LeftUsercreatenum() + o.getThe14LeftUsercreatenum());
                oa.setThe30LeftLoginusernum(oa.getThe30LeftLoginusernum() + o.getThe30LeftLoginusernum());
                oa.setThe30LeftUsercreatenum(oa.getThe30LeftUsercreatenum() + o.getThe30LeftUsercreatenum());
                oa.setThe60LeftLoginusernum(oa.getThe60LeftLoginusernum() + o.getThe60LeftLoginusernum());
                oa.setThe60LeftUsercreatenum(oa.getThe60LeftUsercreatenum() + o.getThe60LeftUsercreatenum());
                oa.setThe90LeftLoginusernum(oa.getThe90LeftLoginusernum() + o.getThe90LeftLoginusernum());
                oa.setThe90LeftUsercreatenum(oa.getThe90LeftUsercreatenum() + o.getThe90LeftUsercreatenum());
                oa.setValidatedNewUser(oa.getValidatedNewUser() + o.getValidatedNewUser());
                // oa.setLoginNewUservalidatedRadio((float)(Math.round((oa.getThe2Left()
                // + o.getThe2Left()) * 100) / 100));
                oa.setLoginRadioAliveUserCount(oa.getLoginRadioAliveUserCount() + o.getLoginRadioAliveUserCount());
                // oa.setLoginRadio((float)(Math.round((oa.getLoginRadio() +
                // o.getLoginRadio()) * 100) / 100));
                oa.setActiveUserCount(oa.getActiveUserCount() + o.getActiveUserCount());
                // oa.setAvgOnlineTime(oa.getAvgOnlineTime() +
                // o.getAvgOnlineTime());
                oa.setSumplaytime(oa.getSumplaytime() + o.getSumplaytime());
                oa.setUseridnum(oa.getUseridnum() + o.getUseridnum());
                oa.setAvgOnlineTime(oa.getAvgOnlineTime() + o.getAvgOnlineTime());
                oa.setPayCount(oa.getPayCount() + o.getPayCount());
                oa.setPayUserCount(oa.getPayUserCount() + o.getPayUserCount());
                oa.setFirstPayUserCount(oa.getFirstPayUserCount() + o.getFirstPayUserCount());
                // oa.setActivePayRadio(oa.getActivePayRadio() +
                // o.getActivePayRadio());
                // oa.setPayARPU(oa.getPayARPU() + o.getPayARPU());
                // oa.setActiveARPU(oa.getActiveARPU() + o.getActiveARPU());
                oa.setNewPayUserCount(oa.getNewPayUserCount() + o.getNewPayUserCount());
                oa.setNewUserPayCount(oa.getNewUserPayCount() + o.getNewUserPayCount());
                // oa.setNewUserPayRatio((float)(Math.round((oa.getNewUserPayRatio()
                // + o.getNewUserPayRatio()) * 100) / 100));
                // oa.setNewPayUserARPU(oa.getNewPayUserARPU() +
                // o.getNewPayUserARPU());
                oa.setThe1ltvNewUser(oa.getThe1ltvNewUser() + o.getThe1ltvNewUser());
                oa.setThe3ltvNewUser(oa.getThe3ltvNewUser() + o.getThe3ltvNewUser());
                oa.setThe7ltvNewUser(oa.getThe7ltvNewUser() + o.getThe7ltvNewUser());
                oa.setThe14ltvNewUser(oa.getThe14ltvNewUser() + o.getThe14ltvNewUser());
                oa.setThe30ltvNewUser(oa.getThe30ltvNewUser() + o.getThe30ltvNewUser());
                oa.setThe60ltvNewUser(oa.getThe60ltvNewUser() + o.getThe60ltvNewUser());
                oa.setThe90ltvNewUser(oa.getThe90ltvNewUser() + o.getThe90ltvNewUser());
                oa.setThe120ltvNewUser(oa.getThe120ltvNewUser() + o.getThe120ltvNewUser());
                oa.setThePayUser(7, oa.getThe7PayUser() + o.getThe7PayUser());
                oa.setThePayUser(14, oa.getThe14PayUser() + o.getThe14PayUser());
                oa.setThePayUser(30, oa.getThe30PayUser() + o.getThe30PayUser());
                oa.setThePayUser(60, oa.getThe60PayUser() + o.getThe60PayUser());
                oa.setThePayUser(90, oa.getThe90PayUser() + o.getThe90PayUser());
                oa.setThePayUser(120, oa.getThe120PayUser() + o.getThe120PayUser());
            }
            platformDataList2.add(oa);
        }
        for (GameReportData tt : platformDataList2) {
            tt.setThe2Left((float) (tt.getThe2LeftLoginusernum() * 1.0 / (tt.getThe2LeftUsercreatenum() == 0 ? 1 : tt.getThe2LeftUsercreatenum())));
            tt.setThe3Left((float) (tt.getThe3LeftLoginusernum() * 1.0 / (tt.getThe3LeftUsercreatenum() == 0 ? 1 : tt.getThe3LeftUsercreatenum())));
            tt.setThe7Left((float) (tt.getThe7LeftLoginusernum() * 1.0 / (tt.getThe7LeftUsercreatenum() == 0 ? 1 : tt.getThe7LeftUsercreatenum())));
            tt.setThe14Left((float) (tt.getThe14LeftLoginusernum() * 1.0 / (tt.getThe14LeftUsercreatenum() == 0 ? 1 : tt.getThe14LeftUsercreatenum())));
            tt.setThe30Left((float) (tt.getThe30LeftLoginusernum() * 1.0 / (tt.getThe30LeftUsercreatenum() == 0 ? 1 : tt.getThe30LeftUsercreatenum())));
            tt.setThe60Left(tt.getThe60LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe60LeftLoginusernum() * 1.0 / tt.getThe60LeftUsercreatenum()));
            tt.setThe90Left(tt.getThe90LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe90LeftLoginusernum() * 1.0 / tt.getThe90LeftUsercreatenum()));
            tt.setLoginNewUservalidatedRadio((float) (tt.getValidatedNewUser() * 1.0 / (tt.getNewUser() == 0 ? 1 : tt.getNewUser())));
            tt.setLoginRadio((float) (tt.getLoginRadioAliveUserCount() * 1.0 / (tt.getValidatedNewUser() == 0 ? 1 : tt.getValidatedNewUser())));
            tt.setAvgOnlineTime(tt.getTogglerDatas().size() == 0 ? 0 : tt.getAvgOnlineTime() / 60 / tt.getTogglerDatas().size());
            tt.setActivePayRadio((float) ((tt.getPayUserCount()) * 1.0 / (tt.getActiveUserCount() == 0 ? 1 : tt.getActiveUserCount())));
            tt.setPayCount(tt.getPayCount());
            tt.setPayARPU(tt.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getPayUserCount()));
            tt.setActiveARPU(tt.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getActiveUserCount()));
            tt.setTheLTV(1, tt.getThe1PayUser());
            tt.setTheLTV(3, tt.getThe3PayUser());
            tt.setTheLTV(7, tt.getThe7PayUser());
            tt.setTheLTV(14, tt.getThe14PayUser());
            tt.setTheLTV(30, tt.getThe30PayUser());
            tt.setTheLTV(60, tt.getThe60PayUser());
            tt.setTheLTV(90, tt.getThe90PayUser());
            tt.setTheLTV(120, tt.getThe120PayUser());
            tt.setNewUserPayRatio(tt.getNewUser() == 0 ? 0 : (float) (tt.getNewPayUserCount() * 1.0 / tt.getNewUser()));
            tt.setActive2NewRadio(tt.getActiveDevice() == 0 ? 0 : (float) (tt.getNewDevice() * 1.0 / tt.getActiveDevice()));
            tt.setNewPayUserARPU(0); // TODO
        }

        // 组装供前端展示的曲线图数据
        for (Entry<String, List<GameReportData>> entry : tmp4.entrySet()) {
            String ds = entry.getKey().split("@")[0];
            String cid = entry.getKey().split("@")[1];
            List<GameReportData> value = entry.getValue();
            LineChartData oa = new LineChartData();
            oa.setDateStr(ds);
            oa.setChannelId(cid);
            for (GameReportData o : value) {
                oa.setNewDevice(oa.getNewDevice() + o.getNewDevice());
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setActiveDevice(oa.getActiveDevice() + o.getActiveDevice());
				/*
				 * oa.setThe2Left((float)(Math.round((oa.getThe2Left() +
				 * o.getThe2Left()) * 100) / 100));
				 * oa.setThe3Left((float)(Math.round((oa.getThe3Left() +
				 * o.getThe3Left()) * 100) / 100));
				 * oa.setThe7Left((float)(Math.round((oa.getThe7Left() +
				 * o.getThe7Left()) * 100) / 100));
				 * oa.setThe14Left((float)(Math.round((oa.getThe14Left() +
				 * o.getThe14Left()) * 100) / 100));
				 * oa.setThe30Left((float)(Math.round((oa.getThe30Left() +
				 * o.getThe30Left()) * 100) / 100));
				 */
                oa.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + o.getThe2LeftLoginusernum());
                oa.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + o.getThe2LeftUsercreatenum());
                oa.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + o.getThe3LeftLoginusernum());
                oa.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + o.getThe3LeftUsercreatenum());
                oa.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + o.getThe7LeftLoginusernum());
                oa.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + o.getThe7LeftUsercreatenum());
                oa.setThe14LeftLoginusernum(oa.getThe14LeftLoginusernum() + o.getThe14LeftLoginusernum());
                oa.setThe14LeftUsercreatenum(oa.getThe14LeftUsercreatenum() + o.getThe14LeftUsercreatenum());
                oa.setThe30LeftLoginusernum(oa.getThe30LeftLoginusernum() + o.getThe30LeftLoginusernum());
                oa.setThe30LeftUsercreatenum(oa.getThe30LeftUsercreatenum() + o.getThe30LeftUsercreatenum());
                oa.setThe60LeftLoginusernum(oa.getThe60LeftLoginusernum() + o.getThe60LeftLoginusernum());
                oa.setThe60LeftUsercreatenum(oa.getThe60LeftUsercreatenum() + o.getThe60LeftUsercreatenum());
                oa.setThe90LeftLoginusernum(oa.getThe90LeftLoginusernum() + o.getThe90LeftLoginusernum());
                oa.setThe90LeftUsercreatenum(oa.getThe90LeftUsercreatenum() + o.getThe90LeftUsercreatenum());
                oa.setValidatedNewUser(oa.getValidatedNewUser() + o.getValidatedNewUser());
                // oa.setLoginNewUservalidatedRadio((float)(Math.round((oa.getThe2Left()
                // + o.getThe2Left()) * 100) / 100));
                oa.setLoginRadioAliveUserCount(oa.getLoginRadioAliveUserCount() + o.getLoginRadioAliveUserCount());
                // oa.setLoginRadio((float)(Math.round((oa.getLoginRadio() +
                // o.getLoginRadio()) * 100) / 100));
                oa.setActiveUserCount(oa.getActiveUserCount() + o.getActiveUserCountByDay());  // mmm
                // oa.setAvgOnlineTime(oa.getAvgOnlineTime() +
                // o.getAvgOnlineTime());
                oa.setSumplaytime(oa.getSumplaytime() + o.getSumplaytime());
                oa.setUseridnum(oa.getUseridnum() + o.getUseridnum());
                oa.setAvgOnlineTime(oa.getAvgOnlineTime() + o.getAvgOnlineTime());
                oa.setPayCount(oa.getPayCount() + o.getPayCount());
                oa.setPayUserCount(oa.getPayUserCount() + o.getPayUserCountByDay());
                oa.setFirstPayUserCount(oa.getFirstPayUserCount() + o.getFirstPayUserCount());
                // oa.setActivePayRadio((float)(oa.getActivePayRadio() +
                // o.getActivePayRadio()));
                // oa.setPayARPU(oa.getPayARPU() + o.getPayARPU());
                // oa.setActiveARPU(oa.getActiveARPU() + o.getActiveARPU());
                oa.setNewPayUserCount(oa.getNewPayUserCount() + o.getNewPayUserCount());
                oa.setNewUserPayCount(oa.getNewUserPayCount() + o.getNewUserPayCount());
                // oa.setNewUserPayRatio((float)(Math.round((oa.getNewUserPayRatio()
                // + o.getNewUserPayRatio()) * 100) / 100));
                // oa.setNewPayUserARPU(oa.getNewPayUserARPU() +
                // o.getNewPayUserARPU());
                oa.setThePayUser(7, oa.getThe7PayUser() + o.getThe7PayUser());
                oa.setThePayUser(14, oa.getThe14PayUser() + o.getThe14PayUser());
                oa.setThePayUser(30, oa.getThe30PayUser() + o.getThe30PayUser());
                oa.setThePayUser(60, oa.getThe60PayUser() + o.getThe60PayUser());
            }
            lineChartDataList.add(oa);
        }
        for (LineChartData tt : lineChartDataList) {
            tt.setThe2Left((float) (tt.getThe2LeftLoginusernum() * 1.0 / (tt.getThe2LeftUsercreatenum() == 0 ? 1 : tt.getThe2LeftUsercreatenum())));
            tt.setThe3Left((float) (tt.getThe3LeftLoginusernum() * 1.0 / (tt.getThe3LeftUsercreatenum() == 0 ? 1 : tt.getThe3LeftUsercreatenum())));
            tt.setThe7Left((float) (tt.getThe7LeftLoginusernum() * 1.0 / (tt.getThe7LeftUsercreatenum() == 0 ? 1 : tt.getThe7LeftUsercreatenum())));
            tt.setThe14Left((float) (tt.getThe14LeftLoginusernum() * 1.0 / (tt.getThe14LeftUsercreatenum() == 0 ? 1 : tt.getThe14LeftUsercreatenum())));
            tt.setThe30Left((float) (tt.getThe30LeftLoginusernum() * 1.0 / (tt.getThe30LeftUsercreatenum() == 0 ? 1 : tt.getThe30LeftUsercreatenum())));
            tt.setThe60Left(tt.getThe60LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe60LeftLoginusernum() * 1.0 / tt.getThe60LeftUsercreatenum()));
            tt.setThe90Left(tt.getThe90LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe90LeftLoginusernum() * 1.0 / tt.getThe90LeftUsercreatenum()));
            tt.setLoginNewUservalidatedRadio((float) (tt.getValidatedNewUser() * 1.0 / (tt.getNewUser() == 0 ? 1 : tt.getNewUser())));
            tt.setLoginRadio((float) (tt.getLoginRadioAliveUserCount() * 1.0 / (tt.getValidatedNewUser() == 0 ? 1 : tt.getValidatedNewUser())));
            tt.setAvgOnlineTime(tt.getAvgOnlineTime() / 60);
            tt.setActivePayRadio((float) ((tt.getPayUserCount()) * 1.0 / (tt.getActiveUserCount() == 0 ? 1 : tt.getActiveUserCount())));
            tt.setPayCount(tt.getPayCount());
            tt.setPayARPU(tt.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getPayUserCount()));
            tt.setActiveARPU(tt.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getActiveUserCount()));
            tt.setTheLTV(1, tt.getNewUser() == 0 ? 0 : (float) (tt.getThe1PayUser() * 1.0 / tt.getNewUser()));
            tt.setTheLTV(3, tt.getNewUser() == 0 ? 0 : (float) (tt.getThe3PayUser() * 1.0 / tt.getNewUser()));
            tt.setTheLTV(7, tt.getNewUser() == 0 ? 0 : (float) (tt.getThe7PayUser() * 1.0 / tt.getNewUser()));
            tt.setTheLTV(14, tt.getNewUser() == 0 ? 0 : (float) (tt.getThe14PayUser() * 1.0 / tt.getNewUser()));
            tt.setTheLTV(30, tt.getNewUser() == 0 ? 0 : (float) (tt.getThe30PayUser() * 1.0 / tt.getNewUser()));
            tt.setTheLTV(60, tt.getNewUser() == 0 ? 0 : (float) (tt.getThe60PayUser() * 1.0 / tt.getNewUser()));
            tt.setTheLTV(90, tt.getNewUser() == 0 ? 0 : (float) (tt.getThe90PayUser() * 1.0 / tt.getNewUser()));
            tt.setTheLTV(120, tt.getNewUser() == 0 ? 0 : (float) (tt.getThe120PayUser() * 1.0 / tt.getNewUser()));
            tt.setNewUserPayRatio(tt.getNewUser() == 0 ? 0 : (float) (tt.getNewPayUserCount() * 1.0 / tt.getNewUser()));
            tt.setActive2NewRadio(tt.getActiveDevice() == 0 ? 0 : (float) (tt.getNewDevice() * 1.0 / tt.getActiveDevice()));
            tt.setNewPayUserARPU(0); // TODO
        }

        // 组装供前端展示的渠道数据
        for (Entry<String, List<GameReportData>> entry : tmp2.entrySet()) {
            List<GameReportData> value = entry.getValue();
            Collections.sort(value, overviewData.comparatorDate);
            GameReportData oa = new GameReportData();
            oa.setTogglerDatas(value);
            oa.setChannelId(entry.getKey());
            for (GameReportData o : value) {
                oa.setNewDevice(oa.getNewDevice() + o.getNewDevice());
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setActiveDevice(oa.getActiveDevice() + o.getActiveDevice());
				/*
				 * oa.setThe2Left((float)(Math.round((oa.getThe2Left() +
				 * o.getThe2Left()) * 100) / 100));
				 * oa.setThe3Left((float)(Math.round((oa.getThe3Left() +
				 * o.getThe3Left()) * 100) / 100));
				 * oa.setThe7Left((float)(Math.round((oa.getThe7Left() +
				 * o.getThe7Left()) * 100) / 100));
				 * oa.setThe14Left((float)(Math.round((oa.getThe14Left() +
				 * o.getThe14Left()) * 100) / 100));
				 * oa.setThe30Left((float)(Math.round((oa.getThe30Left() +
				 * o.getThe30Left()) * 100) / 100));
				 */
                oa.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + o.getThe2LeftLoginusernum());
                oa.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + o.getThe2LeftUsercreatenum());
                oa.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + o.getThe3LeftLoginusernum());
                oa.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + o.getThe3LeftUsercreatenum());
                oa.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + o.getThe7LeftLoginusernum());
                oa.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + o.getThe7LeftUsercreatenum());
                oa.setThe14LeftLoginusernum(oa.getThe14LeftLoginusernum() + o.getThe14LeftLoginusernum());
                oa.setThe14LeftUsercreatenum(oa.getThe14LeftUsercreatenum() + o.getThe14LeftUsercreatenum());
                oa.setThe30LeftLoginusernum(oa.getThe30LeftLoginusernum() + o.getThe30LeftLoginusernum());
                oa.setThe30LeftUsercreatenum(oa.getThe30LeftUsercreatenum() + o.getThe30LeftUsercreatenum());
                oa.setThe60LeftLoginusernum(oa.getThe60LeftLoginusernum() + o.getThe60LeftLoginusernum());
                oa.setThe60LeftUsercreatenum(oa.getThe60LeftUsercreatenum() + o.getThe60LeftUsercreatenum());
                oa.setThe90LeftLoginusernum(oa.getThe90LeftLoginusernum() + o.getThe90LeftLoginusernum());
                oa.setThe90LeftUsercreatenum(oa.getThe90LeftUsercreatenum() + o.getThe90LeftUsercreatenum());
                oa.setValidatedNewUser(oa.getValidatedNewUser() + o.getValidatedNewUser());
                // oa.setLoginNewUservalidatedRadio((float)(Math.round((oa.getThe2Left()
                // + o.getThe2Left()) * 100) / 100));
                oa.setLoginRadioAliveUserCount(oa.getLoginRadioAliveUserCount() + o.getLoginRadioAliveUserCount());
                // oa.setLoginRadio((float)(Math.round((oa.getLoginRadio() +
                // o.getLoginRadio()) * 100) / 100));
                oa.setActiveUserCount(oa.getActiveUserCount() + o.getActiveUserCount());
                // oa.setAvgOnlineTime(oa.getAvgOnlineTime() +
                // o.getAvgOnlineTime());
                oa.setSumplaytime(oa.getSumplaytime() + o.getSumplaytime());
                oa.setUseridnum(oa.getUseridnum() + o.getUseridnum());
                oa.setAvgOnlineTime(oa.getAvgOnlineTime() + o.getAvgOnlineTime());
                oa.setPayCount(oa.getPayCount() + o.getPayCount());
                oa.setPayUserCount(oa.getPayUserCount() + o.getPayUserCount());
                oa.setFirstPayUserCount(oa.getFirstPayUserCount() + o.getFirstPayUserCount());
                // oa.setActivePayRadio(oa.getActivePayRadio() +
                // o.getActivePayRadio());
                // oa.setPayARPU(oa.getPayARPU() + o.getPayARPU());
                // oa.setActiveARPU(oa.getActiveARPU() + o.getActiveARPU());
                oa.setNewPayUserCount(oa.getNewPayUserCount() + o.getNewPayUserCount());
                oa.setNewUserPayCount(oa.getNewUserPayCount() + o.getNewUserPayCount());
                // oa.setNewUserPayRatio((float)(Math.round((oa.getNewUserPayRatio()
                // + o.getNewUserPayRatio()) * 100) / 100));
                // oa.setNewPayUserARPU(oa.getNewPayUserARPU() +
                // o.getNewPayUserARPU());
                oa.setThe1ltvNewUser(oa.getThe1ltvNewUser() + o.getThe1ltvNewUser());
                oa.setThe3ltvNewUser(oa.getThe3ltvNewUser() + o.getThe3ltvNewUser());
                oa.setThe7ltvNewUser(oa.getThe7ltvNewUser() + o.getThe7ltvNewUser());
                oa.setThe14ltvNewUser(oa.getThe14ltvNewUser() + o.getThe14ltvNewUser());
                oa.setThe30ltvNewUser(oa.getThe30ltvNewUser() + o.getThe30ltvNewUser());
                oa.setThe60ltvNewUser(oa.getThe60ltvNewUser() + o.getThe60ltvNewUser());
                oa.setThe90ltvNewUser(oa.getThe90ltvNewUser() + o.getThe90ltvNewUser());
                oa.setThe120ltvNewUser(oa.getThe120ltvNewUser() + o.getThe120ltvNewUser());
                oa.setThePayUser(1, oa.getThe1PayUser() + o.getThe1PayUser());
                oa.setThePayUser(3, oa.getThe3PayUser() + o.getThe3PayUser());
                oa.setThePayUser(7, oa.getThe7PayUser() + o.getThe7PayUser());
                oa.setThePayUser(14, oa.getThe14PayUser() + o.getThe14PayUser());
                oa.setThePayUser(30, oa.getThe30PayUser() + o.getThe30PayUser());
                oa.setThePayUser(60, oa.getThe60PayUser() + o.getThe60PayUser());
                oa.setThePayUser(90, oa.getThe90PayUser() + o.getThe90PayUser());
                oa.setThePayUser(120, oa.getThe120PayUser() + o.getThe120PayUser());
            }
            channelDataList.add(oa);
        }
        for (GameReportData tt : channelDataList) {
            tt.setThe2Left((float) (tt.getThe2LeftLoginusernum() * 1.0 / (tt.getThe2LeftUsercreatenum() == 0 ? 1 : tt.getThe2LeftUsercreatenum())));
            tt.setThe3Left((float) (tt.getThe3LeftLoginusernum() * 1.0 / (tt.getThe3LeftUsercreatenum() == 0 ? 1 : tt.getThe3LeftUsercreatenum())));
            tt.setThe7Left((float) (tt.getThe7LeftLoginusernum() * 1.0 / (tt.getThe7LeftUsercreatenum() == 0 ? 1 : tt.getThe7LeftUsercreatenum())));
            tt.setThe14Left((float) (tt.getThe14LeftLoginusernum() * 1.0 / (tt.getThe14LeftUsercreatenum() == 0 ? 1 : tt.getThe14LeftUsercreatenum())));
            tt.setThe30Left((float) (tt.getThe30LeftLoginusernum() * 1.0 / (tt.getThe30LeftUsercreatenum() == 0 ? 1 : tt.getThe30LeftUsercreatenum())));
            tt.setThe60Left(tt.getThe60LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe60LeftLoginusernum() * 1.0 / tt.getThe60LeftUsercreatenum()));
            tt.setThe90Left(tt.getThe90LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe90LeftLoginusernum() * 1.0 / tt.getThe90LeftUsercreatenum()));
            tt.setLoginNewUservalidatedRadio((float) (tt.getValidatedNewUser() * 1.0 / (tt.getNewUser() == 0 ? 1 : tt.getNewUser())));
            tt.setLoginRadio((float) (tt.getLoginRadioAliveUserCount() * 1.0 / (tt.getValidatedNewUser() == 0 ? 1 : tt.getValidatedNewUser())));
            tt.setAvgOnlineTime(tt.getTogglerDatas().size() == 0 ? 0 : tt.getAvgOnlineTime() / 60 / tt.getTogglerDatas().size());
            tt.setActivePayRadio((float) ((tt.getPayUserCount()) * 1.0 / (tt.getActiveUserCount() == 0 ? 1 : tt.getActiveUserCount())));
            tt.setPayCount(tt.getPayCount());
            tt.setPayARPU(tt.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getPayUserCount()));
            tt.setActiveARPU(tt.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getActiveUserCount()));
            tt.setTheLTV(1, tt.getThe1PayUser());
            tt.setTheLTV(3, tt.getThe3PayUser());
            tt.setTheLTV(7, tt.getThe7PayUser());
            tt.setTheLTV(14, tt.getThe14PayUser());
            tt.setTheLTV(30, tt.getThe30PayUser());
            tt.setTheLTV(60, tt.getThe60PayUser());
            tt.setTheLTV(90, tt.getThe90PayUser());
            tt.setTheLTV(120, tt.getThe120PayUser());
            tt.setNewUserPayRatio(tt.getNewUser() == 0 ? 0 : (float) (tt.getNewPayUserCount() * 1.0 / tt.getNewUser()));
            tt.setActive2NewRadio(tt.getActiveDevice() == 0 ? 0 : (float) (tt.getNewDevice() * 1.0 / tt.getActiveDevice()));
            tt.setNewPayUserARPU(0); // TODO
        }

        // 组装供前端展示的区服数据
        for (Entry<String, List<GameReportData>> entry : tmp3.entrySet()) {
            List<GameReportData> value = entry.getValue();
            Collections.sort(value, overviewData.comparatorDate);
            GameReportData oa = new GameReportData();
            oa.setTogglerDatas(value);
            oa.setServerId(entry.getKey());
            for (GameReportData o : value) {
                oa.setNewDevice(oa.getNewDevice() + o.getNewDevice());
                oa.setNewUser(oa.getNewUser() + o.getNewUser());
                oa.setActiveDevice(oa.getActiveDevice() + o.getActiveDevice());
				/*
				 * oa.setThe2Left((float)(Math.round((oa.getThe2Left() +
				 * o.getThe2Left()) * 100) / 100));
				 * oa.setThe3Left((float)(Math.round((oa.getThe3Left() +
				 * o.getThe3Left()) * 100) / 100));
				 * oa.setThe7Left((float)(Math.round((oa.getThe7Left() +
				 * o.getThe7Left()) * 100) / 100));
				 * oa.setThe14Left((float)(Math.round((oa.getThe14Left() +
				 * o.getThe14Left()) * 100) / 100));
				 * oa.setThe30Left((float)(Math.round((oa.getThe30Left() +
				 * o.getThe30Left()) * 100) / 100));
				 */
                oa.setThe2LeftLoginusernum(oa.getThe2LeftLoginusernum() + o.getThe2LeftLoginusernum());
                oa.setThe2LeftUsercreatenum(oa.getThe2LeftUsercreatenum() + o.getThe2LeftUsercreatenum());
                oa.setThe3LeftLoginusernum(oa.getThe3LeftLoginusernum() + o.getThe3LeftLoginusernum());
                oa.setThe3LeftUsercreatenum(oa.getThe3LeftUsercreatenum() + o.getThe3LeftUsercreatenum());
                oa.setThe7LeftLoginusernum(oa.getThe7LeftLoginusernum() + o.getThe7LeftLoginusernum());
                oa.setThe7LeftUsercreatenum(oa.getThe7LeftUsercreatenum() + o.getThe7LeftUsercreatenum());
                oa.setThe14LeftLoginusernum(oa.getThe14LeftLoginusernum() + o.getThe14LeftLoginusernum());
                oa.setThe14LeftUsercreatenum(oa.getThe14LeftUsercreatenum() + o.getThe14LeftUsercreatenum());
                oa.setThe30LeftLoginusernum(oa.getThe30LeftLoginusernum() + o.getThe30LeftLoginusernum());
                oa.setThe30LeftUsercreatenum(oa.getThe30LeftUsercreatenum() + o.getThe30LeftUsercreatenum());
                oa.setThe60LeftLoginusernum(oa.getThe60LeftLoginusernum() + o.getThe60LeftLoginusernum());
                oa.setThe60LeftUsercreatenum(oa.getThe60LeftUsercreatenum() + o.getThe60LeftUsercreatenum());
                oa.setThe90LeftLoginusernum(oa.getThe90LeftLoginusernum() + o.getThe90LeftLoginusernum());
                oa.setThe90LeftUsercreatenum(oa.getThe90LeftUsercreatenum() + o.getThe90LeftUsercreatenum());
                oa.setValidatedNewUser(oa.getValidatedNewUser() + o.getValidatedNewUser());
                // oa.setLoginNewUservalidatedRadio((float)(Math.round((oa.getThe2Left()
                // + o.getThe2Left()) * 100) / 100));
                oa.setLoginRadioAliveUserCount(oa.getLoginRadioAliveUserCount() + o.getLoginRadioAliveUserCount());
                // oa.setLoginRadio((float)(Math.round((oa.getLoginRadio() +
                // o.getLoginRadio()) * 100) / 100));
                oa.setActiveUserCount(oa.getActiveUserCount() + o.getActiveUserCount());
                // oa.setAvgOnlineTime(oa.getAvgOnlineTime() +
                // o.getAvgOnlineTime());
                oa.setSumplaytime(oa.getSumplaytime() + o.getSumplaytime());
                oa.setUseridnum(oa.getUseridnum() + o.getUseridnum());
                oa.setAvgOnlineTime(oa.getAvgOnlineTime() + o.getAvgOnlineTime());
                oa.setPayCount(oa.getPayCount() + o.getPayCount());
                oa.setPayUserCount(oa.getPayUserCount() + o.getPayUserCount());
                oa.setFirstPayUserCount(oa.getFirstPayUserCount() + o.getFirstPayUserCount());
                // oa.setActivePayRadio(oa.getActivePayRadio() +
                // o.getActivePayRadio());
                // oa.setPayARPU(oa.getPayARPU() + o.getPayARPU());
                // oa.setActiveARPU(oa.getActiveARPU() + o.getActiveARPU());
                oa.setNewPayUserCount(oa.getNewPayUserCount() + o.getNewPayUserCount());
                oa.setNewUserPayCount(oa.getNewUserPayCount() + o.getNewUserPayCount());
                // oa.setNewUserPayRatio((float)(Math.round((oa.getNewUserPayRatio()
                // + o.getNewUserPayRatio()) * 100) / 100));
                // oa.setNewPayUserARPU(oa.getNewPayUserARPU() +
                // o.getNewPayUserARPU());
                oa.setThe1ltvNewUser(oa.getThe1ltvNewUser() + o.getThe1ltvNewUser());
                oa.setThe3ltvNewUser(oa.getThe3ltvNewUser() + o.getThe3ltvNewUser());
                oa.setThe7ltvNewUser(oa.getThe7ltvNewUser() + o.getThe7ltvNewUser());
                oa.setThe14ltvNewUser(oa.getThe14ltvNewUser() + o.getThe14ltvNewUser());
                oa.setThe30ltvNewUser(oa.getThe30ltvNewUser() + o.getThe30ltvNewUser());
                oa.setThe60ltvNewUser(oa.getThe60ltvNewUser() + o.getThe60ltvNewUser());
                oa.setThe90ltvNewUser(oa.getThe90ltvNewUser() + o.getThe90ltvNewUser());
                oa.setThe120ltvNewUser(oa.getThe120ltvNewUser() + o.getThe120ltvNewUser());
                oa.setThePayUser(1, oa.getThe1PayUser() + o.getThe1PayUser());
                oa.setThePayUser(3, oa.getThe3PayUser() + o.getThe3PayUser());
                oa.setThePayUser(7, oa.getThe7PayUser() + o.getThe7PayUser());
                oa.setThePayUser(14, oa.getThe14PayUser() + o.getThe14PayUser());
                oa.setThePayUser(30, oa.getThe30PayUser() + o.getThe30PayUser());
                oa.setThePayUser(60, oa.getThe60PayUser() + o.getThe60PayUser());
                oa.setThePayUser(90, oa.getThe90PayUser() + o.getThe90PayUser());
                oa.setThePayUser(120, oa.getThe120PayUser() + o.getThe120PayUser());
            }
            serverDataList.add(oa);
        }
        for (GameReportData tt : serverDataList) {
            tt.setThe2Left((float) (tt.getThe2LeftLoginusernum() * 1.0 / (tt.getThe2LeftUsercreatenum() == 0 ? 1 : tt.getThe2LeftUsercreatenum())));
            tt.setThe3Left((float) (tt.getThe3LeftLoginusernum() * 1.0 / (tt.getThe3LeftUsercreatenum() == 0 ? 1 : tt.getThe3LeftUsercreatenum())));
            tt.setThe7Left((float) (tt.getThe7LeftLoginusernum() * 1.0 / (tt.getThe7LeftUsercreatenum() == 0 ? 1 : tt.getThe7LeftUsercreatenum())));
            tt.setThe14Left((float) (tt.getThe14LeftLoginusernum() * 1.0 / (tt.getThe14LeftUsercreatenum() == 0 ? 1 : tt.getThe14LeftUsercreatenum())));
            tt.setThe30Left((float) (tt.getThe30LeftLoginusernum() * 1.0 / (tt.getThe30LeftUsercreatenum() == 0 ? 1 : tt.getThe30LeftUsercreatenum())));
            tt.setThe60Left(tt.getThe60LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe60LeftLoginusernum() * 1.0 / tt.getThe60LeftUsercreatenum()));
            tt.setThe90Left(tt.getThe90LeftUsercreatenum() == 0 ? 0 : (float) (tt.getThe90LeftLoginusernum() * 1.0 / tt.getThe90LeftUsercreatenum()));
            tt.setLoginNewUservalidatedRadio((float) (tt.getValidatedNewUser() * 1.0 / (tt.getNewUser() == 0 ? 1 : tt.getNewUser())));
            tt.setLoginRadio((float) (tt.getLoginRadioAliveUserCount() * 1.0 / (tt.getValidatedNewUser() == 0 ? 1 : tt.getValidatedNewUser())));
            tt.setAvgOnlineTime(tt.getTogglerDatas().size() == 0 ? 0 : tt.getAvgOnlineTime() / 60 / tt.getTogglerDatas().size());
            tt.setActivePayRadio((float) ((tt.getPayUserCount()) * 1.0 / (tt.getActiveUserCount() == 0 ? 1 : tt.getActiveUserCount())));
            tt.setPayCount(tt.getPayCount());
            tt.setPayARPU(tt.getPayUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getPayUserCount()));
            tt.setActiveARPU(tt.getActiveUserCount() == 0 ? 0 : PageHelper.floatKeepTwoNumber(tt.getPayCount() * 1.0 / tt.getActiveUserCount()));
            tt.setTheLTV(1, tt.getThe1PayUser());
            tt.setTheLTV(3, tt.getThe3PayUser());
            tt.setTheLTV(7, tt.getThe7PayUser());
            tt.setTheLTV(14, tt.getThe14PayUser());
            tt.setTheLTV(30, tt.getThe30PayUser());
            tt.setTheLTV(60, tt.getThe60PayUser());
            tt.setTheLTV(90, tt.getThe90PayUser());
            tt.setTheLTV(120, tt.getThe120PayUser());
            tt.setNewUserPayRatio(tt.getNewUser() == 0 ? 0 : (float) (tt.getNewPayUserCount() * 1.0 / tt.getNewUser()));
            tt.setActive2NewRadio(tt.getActiveDevice() == 0 ? 0 : (float) (tt.getNewDevice() * 1.0 / tt.getActiveDevice()));
            tt.setNewPayUserARPU(0); // TODO
        }
        Collections.sort(serverDataList, overviewData.comparatorServer);

        // 生成前端曲线图数据
        if (lineChartDataList != null && lineChartDataList.size() > 0) {
            Collections.sort(lineChartDataList, new LineChartData().comparatorDate);
            lineChart.setJsonStr(new ChartTool(lineChartDataList, LineChartData.class, lineChart.getSelectItem()).loadData(lineChart.getJsonType()));
            lineChart.setAllItmes(ChartTool.getAllItems(LineChartData.class));
        } else {
            lineChart.setNull(true);
        }

        // 生成前端三个饼状图数据
        if (channelDataList != null && channelDataList.size() > 0) {
            for (int i = 1; i <= 3; i++) {
                ChartUIData ct = new ChartUIData();
                ct.setJsId(i + "");
                ct.setJsonStr(new ChartTool(channelDataList, GameReportData.class, i == 1 ? "newUser" : (i == 2 ? "activeUserCount" : "payCount")).loadData("pie"));
                ct.setJsonType(ChartType.PIE.type);
                ct.setHeader(i == 1 ? "各渠道新增账号" : (i == 2 ? "各渠道活跃账号" : "各渠道付费金额"));
                pieChartList.add(ct);
            }
        }

        Collections.sort(platformDataList2, overviewData.comparatorPlatformName);
        Collections.sort(channelDataList, overviewData.comparatorChannelName);
        Collections.sort(serverDataList, overviewData.comparatorServerName);
    }

    // 前端数据类，饼状图数据类
    public class GameReportData {
        private String platformId;
        private String channelId;
        private String serverId;
        @ChartFlow(name = "渠道")
        private String channelName;
        private String dateStr; // 日期

        private String serverTypeName = "";

        private int newDevice; // 新增设备数
        private int activeDevice; // 激活设备数
        @ChartSelect(name = "新增帐号", key = 1)
        @ChartData1(name = "新增帐号", key = 1)
        private int newUser; // 新增帐号数
        private int distinctNewUser; // 排重新增帐号数
        private int the1ltvNewUser;  // 1日ltv新增帐号数
        private int the3ltvNewUser;  // 3日ltv新增帐号数
        private int the7ltvNewUser;  // 7日ltv新增帐号数
        private int the14ltvNewUser;  // 14日ltv新增帐号数
        private int the30ltvNewUser;  // 30日ltv新增帐号数
        private int the60ltvNewUser; // 60日ltv新增帐号数
        private int the90ltvNewUser; // 90日ltv新增帐号数
        private int the120ltvNewUser; // 120日ltv新增帐号数
        private float the2Left; // 新增帐号次日留存率
        private int the2LeftLoginusernum; // 次日登录数，次日留存的分子
        private int the2LeftUsercreatenum; // 次日创建数，次日留存的分母
        private float the3Left; // 新增帐号3日留存率
        private int the3LeftLoginusernum; // 次日登录数，3日留存的分子
        private int the3LeftUsercreatenum; // 次日创建数，3日留存的分母
        private float the7Left; // 新增帐号7日留存率
        private int the7LeftLoginusernum; // 次日登录数，7日留存的分子
        private int the7LeftUsercreatenum; // 次日创建数，7日留存的分母
        private float the14Left; // 新增帐号14日留存率
        private int the14LeftLoginusernum; // 次日登录数，14日留存的分子
        private int the14LeftUsercreatenum; // 次日创建数，14日留存的分母
        private float the30Left; // 新增帐号30日留存率
        private int the30LeftLoginusernum; // 次日登录数，30日留存的分子
        private int the30LeftUsercreatenum; // 次日创建数，30日留存的分母
        private float the60Left; // 新增帐号60日留存率
        private int the60LeftLoginusernum; // 次日登录数，60日留存的分子
        private int the60LeftUsercreatenum; // 次日创建数，60日留存的分母
        private float the90Left; // 新增帐号90日留存率
        private int the90LeftLoginusernum; // 次日登录数，90日留存的分子
        private int the90LeftUsercreatenum; // 次日创建数，90日留存的分母
        private float theDevice2Left; // 新增帐号次日留存率
        private float theDevice3Left; // 新增帐号3日留存率
        private float theDevice7Left; // 新增帐号7日留存率
        private int validatedNewUser; // 有效新增用户数
        private float loginNewUservalidatedRadio; // 登录比新增用户有效率
        private int loginRadioAliveUserCount; // 一阶登录比留存用户数
        private float loginRadio; // 一阶登录比。loginNewUservalidatedRadio / validatedNewUser
        private int the3LoginUserNumOfFirstWeek;  // 首周登录三天用户数
        private int the1LoginUserNumOfSecondWeek;  // 次周登录过的用户数
        private float loginRadio2; // 二阶登录比. the1LoginUserNumOfSecondWeek / the3LoginUserNumOfFirstWeek
        @ChartSelect(name = "活跃帐号", key = 2)
        @ChartData1(name = "活跃帐号", key = 2)
        private int activeUserCount; // 活跃账号总数
        private int activeUserCountByDay;  // 单日活跃帐号数
        private int avgOnlineTime; // 人均在线时长(m)
        private long sumplaytime; // 在线总时长
        private long useridnum; // 在线总人数
        private double avgLoginTime; // 人均登录次数
        @ChartSelect(name = "付费金额", key = 3)
        @ChartData1(name = "付费金额", key = 3)
        private int payCount; // 付费金额
        private int payUserCount; // 付费账号数
        private int payUserCountByDay; // 单日付费账号数
        private int firstPayUserCount; // 首次付费账号数
        private float activePayRadio; // 活跃付费率
        private float payARPU; // 付费ARPU
        private float activeARPU; // 活跃ARPU
        private int newPayUserCount; // 新增账号付费人数
        private int newUserPayCount; // 新增账号付费金额
        private float active2NewRadio;  // 新增激活转化率
        private float newUserPayRatio; // 新增账号付费率
        private float newPayUserARPU; // 新增账号付费ARPU
        private int the1PayUser;  // 1日付费
        private int the3PayUser;  // 3日付费
        private int the7PayUser;  // 7日付费
        private int the14PayUser;  // 14日付费
        private int the30PayUser;  // 30日付费
        private int the60PayUser;  // 60日付费
        private int the90PayUser;  // 90日付费
        private int the120PayUser;  // 120日付费
        private float the1LTV; // 1日LTV
        private float the3LTV; // 3日LTV
        private float the7LTV; // 7日LTV
        private float the14LTV; // 14日LTV
        private float the30LTV; // 30日LTV
        private float the60LTV; // 60日LTV
        private float the90LTV; // 90日LTV
        private float the120LTV; // 120日LTV
        private long acu;  // acu
        private int pcu; // pcu

        public int getThe90ltvNewUser() {
            return the90ltvNewUser;
        }

        public void setThe90ltvNewUser(int the90ltvNewUser) {
            this.the90ltvNewUser = the90ltvNewUser;
        }

        public int getThe120ltvNewUser() {
            return the120ltvNewUser;
        }

        public void setThe120ltvNewUser(int the120ltvNewUser) {
            this.the120ltvNewUser = the120ltvNewUser;
        }

        private List<GameReportData> togglerDatas; // 点击扩展显示的数据

        public int getThe1ltvNewUser() {
            return the1ltvNewUser;
        }

        public void setThe1ltvNewUser(int the1ltvNewUser) {
            this.the1ltvNewUser = the1ltvNewUser;
        }

        public int getThe3ltvNewUser() {
            return the3ltvNewUser;
        }

        public void setThe3ltvNewUser(int the3ltvNewUser) {
            this.the3ltvNewUser = the3ltvNewUser;
        }

        public int getThe1PayUser() {
            return the1PayUser;
        }

        public void setThe1PayUser(int the1PayUser) {
            this.the1PayUser = the1PayUser;
        }

        public int getThe3PayUser() {
            return the3PayUser;
        }

        public void setThe3PayUser(int the3PayUser) {
            this.the3PayUser = the3PayUser;
        }

        public float getThe1LTV() {
            return the1LTV;
        }

        public void setThe1LTV(float the1LTV) {
            this.the1LTV = the1LTV;
        }

        public float getThe3LTV() {
            return the3LTV;
        }

        public void setThe3LTV(float the3LTV) {
            this.the3LTV = the3LTV;
        }

        // 根据日期排序的比较器
        public final Comparator<GameReportData> comparatorDate = new Comparator<GameReportData>() {
            public int compare(GameReportData s1, GameReportData s2) {
                return s2.getDateStr().compareTo(s1.getDateStr()); //(int) (Time.formatDateStr(s2.getDateStr(), "yyyy-MM-dd") - Time.formatDateStr(s1.getDateStr(), "yyyy-MM-dd"));
            }
        };

        // 根据日期排序的比较器（低到高）
        public final Comparator<GameReportData> comparatorDate2 = new Comparator<GameReportData>() {
            public int compare(GameReportData s1, GameReportData s2) {
                return s1.getDateStr().compareTo(s2.getDateStr()); //(int) (Time.formatDateStr(s2.getDateStr(), "yyyy-MM-dd") - Time.formatDateStr(s1.getDateStr(), "yyyy-MM-dd"));
            }
        };

        // 根据serverid排序的比较器
        public final Comparator<GameReportData> comparatorServer = new Comparator<GameReportData>() {
            public int compare(GameReportData s1, GameReportData s2) {
                return s1.getServerId().compareTo(s2.getServerId());
            }
        };

        public final Comparator<GameReportData> comparatorPlatformId = new Comparator<GameReportData>() {
            public int compare(GameReportData s1, GameReportData s2) {
                if ("0".equals(s1.getPlatformId())) {
                    return 1;
                } else {
                    return -1;
                }
            }
        };

        public final Comparator<GameReportData> comparatorPlatformName = new Comparator<GameReportData>() {
            public int compare(GameReportData s1, GameReportData s2) {
                return BiPlatformManager.getPlatformNameById(s1.getPlatformId()).compareTo(BiPlatformManager.getPlatformNameById(s2.getPlatformId()));
            }
        };

        public final Comparator<GameReportData> comparatorChannelName = new Comparator<GameReportData>() {
            public int compare(GameReportData s1, GameReportData s2) {
                return BiPlatformManager.getChannelNameById(s1.getChannelId()).compareTo(BiPlatformManager.getChannelNameById(s2.getChannelId()));
            }
        };

        public final Comparator<GameReportData> comparatorServerName = new Comparator<GameReportData>() {
            public int compare(GameReportData s1, GameReportData s2) {
                return BiPlatformManager.getServerNameById(s1.getServerId()).compareTo(BiPlatformManager.getServerNameById(s2.getServerId()));
            }
        };

        // 是不是总体数据（）
        public boolean isAllData() {
            return "0".equals(platformId) && "0".equals(channelId) && "0".equals(serverId);
        }


        public float getTheDevice2Left() {
            return theDevice2Left;
        }

        public void setTheDevice2Left(float theDevice2Left) {
            this.theDevice2Left = theDevice2Left;
        }

        public double getAvgLoginTime() {
            return avgLoginTime;
        }

        public void setAvgLoginTime(double avgLoginTime) {
            this.avgLoginTime = avgLoginTime;
        }

        public float getTheDevice3Left() {
            return theDevice3Left;
        }

        public void setTheDevice3Left(float theDevice3Left) {
            this.theDevice3Left = theDevice3Left;
        }

        public float getTheDevice7Left() {
            return theDevice7Left;
        }

        public void setTheDevice7Left(float theDevice7Left) {
            this.theDevice7Left = theDevice7Left;
        }

        public void setTheLtvNewUser(int d, int newUser) {
            if (d >= 1) {
                the1ltvNewUser = newUser;
            }
            if (d >= 3) {
                the3ltvNewUser = newUser;
            }
            if (d >= 7) {
                the7ltvNewUser = newUser;
            }
            if (d >= 14) {
                the14ltvNewUser = newUser;
            }
            if (d >= 30) {
                the30ltvNewUser = newUser;
            }
            if (d >= 60) {
                the60ltvNewUser = newUser;
            }
            if (d >= 90) {
                the90ltvNewUser = newUser;
            }
            if (d >= 120) {
                the120ltvNewUser = newUser;
            }
        }

        public void setThePayUser(int d, int payUser) {
            if (d == 1) {
                the1PayUser = payUser;
            } else if (d == 3) {
                the3PayUser = payUser;
            } else if (d == 7) {
                the7PayUser = payUser;
            } else if (d == 14) {
                the14PayUser = payUser;
            } else if (d == 30) {
                the30PayUser = payUser;
            } else if (d == 60) {
                the60PayUser = payUser;
            } else if (d == 90) {
                the90PayUser = payUser;
            } else if (d == 120) {
                the120PayUser = payUser;
            }
        }

        public void setTheLTV(int d, int cashadd) {
            if (d == 1) {
                the1LTV = PageHelper.floatKeepTwoNumber(the1ltvNewUser == 0 ? 0 : (float) (cashadd * 1.0 / the1ltvNewUser));
            } else if (d == 3) {
                the3LTV = PageHelper.floatKeepTwoNumber(the3ltvNewUser == 0 ? 0 : (float) (cashadd * 1.0 / the3ltvNewUser));
            } else if (d == 7) {
                the7LTV = PageHelper.floatKeepTwoNumber(the7ltvNewUser == 0 ? 0 : (float) (cashadd * 1.0 / the7ltvNewUser));
            } else if (d == 14) {
                the14LTV = PageHelper.floatKeepTwoNumber(the14ltvNewUser == 0 ? 0 : (float) (cashadd * 1.0 / the14ltvNewUser));
            } else if (d == 30) {
                the30LTV = PageHelper.floatKeepTwoNumber(the30ltvNewUser == 0 ? 0 : (float) (cashadd * 1.0 / the30ltvNewUser));
            } else if (d == 60) {
                the60LTV = PageHelper.floatKeepTwoNumber(the60ltvNewUser == 0 ? 0 : (float) (cashadd * 1.0 / the60ltvNewUser));
            } else if (d == 90) {
                the90LTV = PageHelper.floatKeepTwoNumber(the90ltvNewUser == 0 ? 0 : (float) (cashadd * 1.0 / the90ltvNewUser));
            } else if (d == 120) {
                the120LTV = PageHelper.floatKeepTwoNumber(the120ltvNewUser == 0 ? 0 : (float) (cashadd * 1.0 / the120ltvNewUser));
            }
        }

        public int getThe90PayUser() {
            return the90PayUser;
        }

        public void setThe90PayUser(int the90PayUser) {
            this.the90PayUser = the90PayUser;
        }

        public int getThe120PayUser() {
            return the120PayUser;
        }

        public void setThe120PayUser(int the120PayUser) {
            this.the120PayUser = the120PayUser;
        }

        public float getThe90LTV() {
            return the90LTV;
        }

        public void setThe90LTV(float the90LTV) {
            this.the90LTV = the90LTV;
        }

        public float getThe120LTV() {
            return the120LTV;
        }

        public void setThe120LTV(float the120LTV) {
            this.the120LTV = the120LTV;
        }

        public float getThe60Left() {
            return the60Left;
        }

        public void setThe60Left(float the60Left) {
            this.the60Left = the60Left;
        }

        public int getThe60LeftLoginusernum() {
            return the60LeftLoginusernum;
        }

        public void setThe60LeftLoginusernum(int the60LeftLoginusernum) {
            this.the60LeftLoginusernum = the60LeftLoginusernum;
        }

        public int getThe60LeftUsercreatenum() {
            return the60LeftUsercreatenum;
        }

        public void setThe60LeftUsercreatenum(int the60LeftUsercreatenum) {
            this.the60LeftUsercreatenum = the60LeftUsercreatenum;
        }

        public float getThe90Left() {
            return the90Left;
        }

        public void setThe90Left(float the90Left) {
            this.the90Left = the90Left;
        }

        public int getThe90LeftLoginusernum() {
            return the90LeftLoginusernum;
        }

        public void setThe90LeftLoginusernum(int the90LeftLoginusernum) {
            this.the90LeftLoginusernum = the90LeftLoginusernum;
        }

        public int getThe90LeftUsercreatenum() {
            return the90LeftUsercreatenum;
        }

        public void setThe90LeftUsercreatenum(int the90LeftUsercreatenum) {
            this.the90LeftUsercreatenum = the90LeftUsercreatenum;
        }

        public int getActiveDevice() {
            return activeDevice;
        }

        public void setActiveDevice(int activeDevice) {
            this.activeDevice = activeDevice;
        }

        public String getPlatformId() {
            return platformId;
        }

        public void setPlatformId(String platformId) {
            this.platformId = platformId;
        }

        public String getChannelId() {
            return channelId;
        }

        public void setChannelId(String channelId) {
            this.channelId = channelId;
            this.channelName = BiPlatformManager.getChannelNameById(channelId);
        }

        public float getActive2NewRadio() {
            return active2NewRadio;
        }

        public void setActive2NewRadio(float active2NewRadio) {
            this.active2NewRadio = active2NewRadio;
        }

        public String getServerId() {
            return serverId;
        }

        public void setServerId(String serverId) {
            this.serverId = serverId;
        }

        public String getChannelName() {
            return channelName;
        }

        public void setChannelName(String channelName) {
            this.channelName = channelName;
        }

        public String getDateStr() {
            return dateStr;
        }

        public void setDateStr(String dateStr) {
            this.dateStr = dateStr;
        }

        public int getNewDevice() {
            return newDevice;
        }

        public void setNewDevice(int newDevice) {
            this.newDevice = newDevice;
        }

        public int getNewUser() {
            return newUser;
        }

        public void setNewUser(int newUser) {
            this.newUser = newUser;
        }

        public long getAcu() {
            return acu;
        }

        public void setAcu(long acu) {
            this.acu = acu;
        }

        public int getPcu() {
            return pcu;
        }

        public void setPcu(int pcu) {
            this.pcu = pcu;
        }

        public int getDistinctNewUser() {
            return distinctNewUser;
        }

        public void setDistinctNewUser(int distinctNewUser) {
            this.distinctNewUser = distinctNewUser;
        }

        public float getThe2Left() {
            return the2Left;
        }

        public void setThe2Left(float the2Left) {
            this.the2Left = the2Left;
        }

        public float getThe3Left() {
            return the3Left;
        }

        public void setThe3Left(float the3Left) {
            this.the3Left = the3Left;
        }

        public float getThe7Left() {
            return the7Left;
        }

        public void setThe7Left(float the7Left) {
            this.the7Left = the7Left;
        }

        public float getThe14Left() {
            return the14Left;
        }

        public void setThe14Left(float the14Left) {
            this.the14Left = the14Left;
        }

        public float getThe30Left() {
            return the30Left;
        }

        public void setThe30Left(float the30Left) {
            this.the30Left = the30Left;
        }

        public int getValidatedNewUser() {
            return validatedNewUser;
        }

        public void setValidatedNewUser(int validatedNewUser) {
            this.validatedNewUser = validatedNewUser;
        }

        public float getLoginNewUservalidatedRadio() {
            return loginNewUservalidatedRadio;
        }

        public int getThe60ltvNewUser() {
            return the60ltvNewUser;
        }

        public void setThe60ltvNewUser(int the60ltvNewUser) {
            this.the60ltvNewUser = the60ltvNewUser;
        }

        public int getThe60PayUser() {
            return the60PayUser;
        }

        public void setThe60PayUser(int the60PayUser) {
            this.the60PayUser = the60PayUser;
        }

        public float getThe60LTV() {
            return the60LTV;
        }

        public void setThe60LTV(float the60LTV) {
            this.the60LTV = the60LTV;
        }

        public void setLoginNewUservalidatedRadio(float loginNewUservalidatedRadio) {
            this.loginNewUservalidatedRadio = loginNewUservalidatedRadio;
        }

        public int getLoginRadioAliveUserCount() {
            return loginRadioAliveUserCount;
        }

        public void setLoginRadioAliveUserCount(int loginRadioAliveUserCount) {
            this.loginRadioAliveUserCount = loginRadioAliveUserCount;
        }

        public float getLoginRadio() {
            return loginRadio;
        }

        public void setLoginRadio(float loginRadio) {
            this.loginRadio = loginRadio;
        }

        public int getActiveUserCount() {
            return activeUserCount;
        }

        public void setActiveUserCount(int activeUserCount) {
            this.activeUserCount = activeUserCount;
        }

        public int getAvgOnlineTime() {
            return avgOnlineTime;
        }

        public void setAvgOnlineTime(int avgOnlineTime) {
            this.avgOnlineTime = avgOnlineTime;
        }

        public int getPayCount() {
            return payCount;
        }

        public void setPayCount(int payCount) {
            this.payCount = payCount;
        }

        public int getPayUserCount() {
            return payUserCount;
        }

        public void setPayUserCount(int payUserCount) {
            this.payUserCount = payUserCount;
        }

        public int getFirstPayUserCount() {
            return firstPayUserCount;
        }

        public void setFirstPayUserCount(int firstPayUserCount) {
            this.firstPayUserCount = firstPayUserCount;
        }

        public float getActivePayRadio() {
            return activePayRadio;
        }

        public void setActivePayRadio(float activePayRadio) {
            this.activePayRadio = activePayRadio;
        }

        public float getPayARPU() {
            return payARPU;
        }

        public void setPayARPU(float payARPU) {
            this.payARPU = payARPU;
        }

        public float getActiveARPU() {
            return activeARPU;
        }

        public void setActiveARPU(float activeARPU) {
            this.activeARPU = activeARPU;
        }

        public int getNewPayUserCount() {
            return newPayUserCount;
        }

        public void setNewPayUserCount(int newPayUserCount) {
            this.newPayUserCount = newPayUserCount;
        }

        public int getNewUserPayCount() {
            return newUserPayCount;
        }

        public void setNewUserPayCount(int newUserPayCount) {
            this.newUserPayCount = newUserPayCount;
        }

        public float getNewUserPayRatio() {
            return newUserPayRatio;
        }

        public void setNewUserPayRatio(float newUserPayRatio) {
            this.newUserPayRatio = newUserPayRatio;
        }

        public float getNewPayUserARPU() {
            return newPayUserARPU;
        }

        public void setNewPayUserARPU(float newPayUserARPU) {
            this.newPayUserARPU = newPayUserARPU;
        }

        public float getThe7LTV() {
            return the7LTV;
        }

        public void setThe7LTV(float the7ltv) {
            the7LTV = the7ltv;
        }

        public float getThe14LTV() {
            return the14LTV;
        }

        public void setThe14LTV(float the14ltv) {
            the14LTV = the14ltv;
        }

        public float getThe30LTV() {
            return the30LTV;
        }

        public void setThe30LTV(float the30ltv) {
            the30LTV = the30ltv;
        }

        public int getThe2LeftLoginusernum() {
            return the2LeftLoginusernum;
        }

        public void setThe2LeftLoginusernum(int the2LeftLoginusernum) {
            this.the2LeftLoginusernum = the2LeftLoginusernum;
        }

        public int getThe2LeftUsercreatenum() {
            return the2LeftUsercreatenum;
        }

        public void setThe2LeftUsercreatenum(int the2LeftUsercreatenum) {
            this.the2LeftUsercreatenum = the2LeftUsercreatenum;
        }

        public int getThe3LeftLoginusernum() {
            return the3LeftLoginusernum;
        }

        public void setThe3LeftLoginusernum(int the3LeftLoginusernum) {
            this.the3LeftLoginusernum = the3LeftLoginusernum;
        }

        public int getThe3LeftUsercreatenum() {
            return the3LeftUsercreatenum;
        }

        public void setThe3LeftUsercreatenum(int the3LeftUsercreatenum) {
            this.the3LeftUsercreatenum = the3LeftUsercreatenum;
        }

        public int getThe7LeftLoginusernum() {
            return the7LeftLoginusernum;
        }

        public void setThe7LeftLoginusernum(int the7LeftLoginusernum) {
            this.the7LeftLoginusernum = the7LeftLoginusernum;
        }

        public int getThe7LeftUsercreatenum() {
            return the7LeftUsercreatenum;
        }

        public void setThe7LeftUsercreatenum(int the7LeftUsercreatenum) {
            this.the7LeftUsercreatenum = the7LeftUsercreatenum;
        }

        public int getThe14LeftLoginusernum() {
            return the14LeftLoginusernum;
        }

        public void setThe14LeftLoginusernum(int the14LeftLoginusernum) {
            this.the14LeftLoginusernum = the14LeftLoginusernum;
        }

        public int getThe14LeftUsercreatenum() {
            return the14LeftUsercreatenum;
        }

        public void setThe14LeftUsercreatenum(int the14LeftUsercreatenum) {
            this.the14LeftUsercreatenum = the14LeftUsercreatenum;
        }

        public int getThe30LeftLoginusernum() {
            return the30LeftLoginusernum;
        }

        public void setThe30LeftLoginusernum(int the30LeftLoginusernum) {
            this.the30LeftLoginusernum = the30LeftLoginusernum;
        }

        public int getThe30LeftUsercreatenum() {
            return the30LeftUsercreatenum;
        }

        public void setThe30LeftUsercreatenum(int the30LeftUsercreatenum) {
            this.the30LeftUsercreatenum = the30LeftUsercreatenum;
        }

        public long getSumplaytime() {
            return sumplaytime;
        }

        public void setSumplaytime(long sumplaytime) {
            this.sumplaytime = sumplaytime;
        }

        public long getUseridnum() {
            return useridnum;
        }

        public void setUseridnum(long useridnum) {
            this.useridnum = useridnum;
        }

        public List<GameReportData> getTogglerDatas() {
            return togglerDatas;
        }

        public void setTogglerDatas(List<GameReportData> togglerDatas) {
            this.togglerDatas = togglerDatas;
        }

        public int getActiveUserCountByDay() {
            return activeUserCountByDay;
        }

        public void setActiveUserCountByDay(int activeUserCountByDay) {
            this.activeUserCountByDay = activeUserCountByDay;
        }

        public int getPayUserCountByDay() {
            return payUserCountByDay;
        }

        public void setPayUserCountByDay(int payUserCountByDay) {
            this.payUserCountByDay = payUserCountByDay;
        }

        public int getThe7PayUser() {
            return the7PayUser;
        }

        public void setThe7PayUser(int the7PayUser) {
            this.the7PayUser = the7PayUser;
        }

        public int getThe14PayUser() {
            return the14PayUser;
        }

        public void setThe14PayUser(int the14PayUser) {
            this.the14PayUser = the14PayUser;
        }

        public int getThe30PayUser() {
            return the30PayUser;
        }

        public void setThe30PayUser(int the30PayUser) {
            this.the30PayUser = the30PayUser;
        }

        public int getThe7ltvNewUser() {
            return the7ltvNewUser;
        }

        public void setThe7ltvNewUser(int the7ltvNewUser) {
            this.the7ltvNewUser = the7ltvNewUser;
        }

        public int getThe14ltvNewUser() {
            return the14ltvNewUser;
        }

        public void setThe14ltvNewUser(int the14ltvNewUser) {
            this.the14ltvNewUser = the14ltvNewUser;
        }

        public int getThe30ltvNewUser() {
            return the30ltvNewUser;
        }

        public void setThe30ltvNewUser(int the30ltvNewUser) {
            this.the30ltvNewUser = the30ltvNewUser;
        }

        public String getServerTypeName() {
            return serverTypeName;
        }

        public void setServerTypeName(String serverTypeName) {
            this.serverTypeName = serverTypeName;
        }

        public float getLoginRadio2() {
            return loginRadio2;
        }

        public void setLoginRadio2(float loginRadio2) {
            this.loginRadio2 = loginRadio2;
        }

        public int getThe3LoginUserNumOfFirstWeek() {
            return the3LoginUserNumOfFirstWeek;
        }

        public void setThe3LoginUserNumOfFirstWeek(int the3LoginUserNumOfFirstWeek) {
            this.the3LoginUserNumOfFirstWeek = the3LoginUserNumOfFirstWeek;
        }

        public int getThe1LoginUserNumOfSecondWeek() {
            return the1LoginUserNumOfSecondWeek;
        }

        public void setThe1LoginUserNumOfSecondWeek(int the1LoginUserNumOfSecondWeek) {
            this.the1LoginUserNumOfSecondWeek = the1LoginUserNumOfSecondWeek;
        }
    }

    // 这个曲线图比较特殊，要根据渠道名称的不同，画出多个曲线，而前面的饼状图没有这个需求，因为GameReportData类被饼状图用了，这里另写一个曲线图用的图表数据类
    public class LineChartData {
        private String channelId;
        private String channelName;
        @ChartFlow(name = "日期")
        private String dateStr; // 日期
        private int newDevice; // 新增设备数
        private int activeDevice; // 激活设备数
        @ChartSelect(name = "新增帐号", key = 1)
        @ChartData1(name = "新增帐号", key = 1, multiByFiled = "channelName")
        private int newUser; // 新增帐号数
        private int the1ltvNewUser;  // 1日ltv新增帐号数
        private int the3ltvNewUser;  // 3日ltv新增帐号数
        private int the7ltvNewUser;  // 7日ltv新增帐号数
        private int the14ltvNewUser;  // 14日ltv新增帐号数
        private int the30ltvNewUser;  // 30日ltv新增帐号数
        private int the60ltvNewUser;  // 60日ltv新增帐号数
        private int the90ltvNewUser;  // 90日ltv新增帐号数
        private int the120ltvNewUser;  // 120日ltv新增帐号数
        private float the2Left; // 新增帐号次日留存率
        private int the2LeftLoginusernum; // 次日登录数，次日留存的分子
        private int the2LeftUsercreatenum; // 次日创建数，次日留存的分母
        private float the3Left; // 新增帐号3日留存率
        private int the3LeftLoginusernum; // 次日登录数，3日留存的分子
        private int the3LeftUsercreatenum; // 次日创建数，3日留存的分母
        private float the7Left; // 新增帐号7日留存率
        private int the7LeftLoginusernum; // 次日登录数，7日留存的分子
        private int the7LeftUsercreatenum; // 次日创建数，7日留存的分母
        private float the14Left; // 新增帐号14日留存率
        private int the14LeftLoginusernum; // 次日登录数，14日留存的分子
        private int the14LeftUsercreatenum; // 次日创建数，14日留存的分母
        private float the30Left; // 新增帐号30日留存率
        private int the30LeftLoginusernum; // 次日登录数，30日留存的分子
        private int the30LeftUsercreatenum; // 次日创建数，30日留存的分母
        private float the60Left; // 新增帐号60日留存率
        private int the60LeftLoginusernum; // 次日登录数，60日留存的分子
        private int the60LeftUsercreatenum; // 次日创建数，60日留存的分母
        private float the90Left; // 新增帐号90日留存率
        private int the90LeftLoginusernum; // 次日登录数，90日留存的分子
        private int the90LeftUsercreatenum; // 次日创建数，90日留存的分母
        private int validatedNewUser; // 有效新增用户数
        private float loginNewUservalidatedRadio; // 登录比新增用户有效率
        private int loginRadioAliveUserCount; // 登录比留存用户数
        private float loginRadio; // 登录比
        @ChartSelect(name = "活跃帐号", key = 2)
        @ChartData1(name = "活跃帐号", key = 2, multiByFiled = "channelName")
        private int activeUserCount; // 活跃账号数
        private int avgOnlineTime; // 人均在线时长(m)
        private long sumplaytime; // 在线总时长
        private long useridnum; // 在线总人数
        @ChartSelect(name = "付费金额", key = 3)
        @ChartData1(name = "付费金额", key = 3, multiByFiled = "channelName")
        private int payCount; // 付费金额
        private int payUserCount; // 付费账号数
        private int firstPayUserCount; // 首次付费账号数
        private float activePayRadio; // 首次付费账号数
        private float active2NewRadio;  // 激活新增转化率
        private float payARPU; // 付费ARPU
        private float activeARPU; // 活跃ARPU
        private int newPayUserCount; // 新增账号付费人数
        private int newUserPayCount; // 新增账号付费金额
        private float newUserPayRatio; // 新增账号付费率
        private float newPayUserARPU; // 新增账号付费ARPU
        private int the1PayUser;  // 1日付费用户
        private int the3PayUser;  // 3日付费用户
        private int the7PayUser;  // 7日付费用户
        private int the14PayUser;  // 14日付费
        private int the30PayUser;  // 30日付费
        private int the60PayUser;  // 60日付费
        private int the90PayUser;  // 90日付费
        private int the120PayUser;  // 120日付费
        private float the1LTV; // 1日LTV
        private float the3LTV; // 3日LTV
        private float the7LTV; // 7日LTV
        private float the14LTV; // 14日LTV
        private float the30LTV; // 30日LTV
        private float the60LTV; // 60日LTV
        private float the90LTV; // 90日LTV
        private float the120LTV; // 120日LTV

        // 根据日期排序的比较器
        public final Comparator<LineChartData> comparatorDate = new Comparator<LineChartData>() {
            public int compare(LineChartData s1, LineChartData s2) {
                return s1.getDateStr().compareTo(s2.getDateStr());
                //return (int) (Time.formatDateStr(s1.getDateStr(), "yyyy-MM-dd") - Time.formatDateStr(s2.getDateStr(), "yyyy-MM-dd"));
            }
        };

        public int getThe90ltvNewUser() {
            return the90ltvNewUser;
        }

        public void setThe90ltvNewUser(int the90ltvNewUser) {
            this.the90ltvNewUser = the90ltvNewUser;
        }

        public int getThe120ltvNewUser() {
            return the120ltvNewUser;
        }

        public void setThe120ltvNewUser(int the120ltvNewUser) {
            this.the120ltvNewUser = the120ltvNewUser;
        }

        public void setThePayUser(int d, int payUser) {
            if (d == 1) {
                the1PayUser = payUser;
            } else if (d == 3) {
                the3PayUser = payUser;
            } else if (d == 7) {
                the7PayUser = payUser;
            } else if (d == 14) {
                the14PayUser = payUser;
            } else if (d == 30) {
                the30PayUser = payUser;
            } else if (d == 60) {
                the60PayUser = payUser;
            } else if (d == 90) {
                the90PayUser = payUser;
            } else if (d == 120) {
                the120PayUser = payUser;
            }
        }

        public void setTheLTV(int d, float ltv) {
            ltv = PageHelper.floatKeepTwoNumber(ltv);
            if (d == 1) {
                the1LTV = ltv;
            } else if (d == 3) {
                the3LTV = ltv;
            } else if (d == 7) {
                the7LTV = ltv;
            } else if (d == 14) {
                the14LTV = ltv;
            } else if (d == 30) {
                the30LTV = ltv;
            } else if (d == 60) {
                the60LTV = ltv;
            } else if (d == 90) {
                the90LTV = ltv;
            } else if (d == 120) {
                the120LTV = ltv;
            }
        }

        public int getThe1ltvNewUser() {
            return the1ltvNewUser;
        }

        public void setThe1ltvNewUser(int the1ltvNewUser) {
            this.the1ltvNewUser = the1ltvNewUser;
        }

        public int getThe3ltvNewUser() {
            return the3ltvNewUser;
        }

        public void setThe3ltvNewUser(int the3ltvNewUser) {
            this.the3ltvNewUser = the3ltvNewUser;
        }

        public int getThe1PayUser() {
            return the1PayUser;
        }

        public void setThe1PayUser(int the1PayUser) {
            this.the1PayUser = the1PayUser;
        }

        public int getThe3PayUser() {
            return the3PayUser;
        }

        public void setThe3PayUser(int the3PayUser) {
            this.the3PayUser = the3PayUser;
        }

        public float getThe1LTV() {
            return the1LTV;
        }

        public void setThe1LTV(float the1LTV) {
            this.the1LTV = the1LTV;
        }

        public float getThe3LTV() {
            return the3LTV;
        }

        public void setThe3LTV(float the3LTV) {
            this.the3LTV = the3LTV;
        }

        public int getThe90PayUser() {
            return the90PayUser;
        }

        public void setThe90PayUser(int the90PayUser) {
            this.the90PayUser = the90PayUser;
        }

        public int getThe120PayUser() {
            return the120PayUser;
        }

        public void setThe120PayUser(int the120PayUser) {
            this.the120PayUser = the120PayUser;
        }

        public float getThe90LTV() {
            return the90LTV;
        }

        public void setThe90LTV(float the90LTV) {
            this.the90LTV = the90LTV;
        }

        public float getThe120LTV() {
            return the120LTV;
        }

        public void setThe120LTV(float the120LTV) {
            this.the120LTV = the120LTV;
        }

        public float getActive2NewRadio() {
            return active2NewRadio;
        }

        public void setActive2NewRadio(float active2NewRadio) {
            this.active2NewRadio = active2NewRadio;
        }

        public int getActiveDevice() {
            return activeDevice;
        }

        public void setActiveDevice(int activeDevice) {
            this.activeDevice = activeDevice;
        }

        public String getChannelName() {
            return channelName;
        }

        public void setChannelName(String channelName) {
            this.channelName = channelName;
        }

        public String getDateStr() {
            return dateStr;
        }

        public void setDateStr(String dateStr) {
            this.dateStr = dateStr;
        }

        public int getNewDevice() {
            return newDevice;
        }

        public void setNewDevice(int newDevice) {
            this.newDevice = newDevice;
        }

        public int getNewUser() {
            return newUser;
        }

        public void setNewUser(int newUser) {
            this.newUser = newUser;
        }

        public float getThe2Left() {
            return the2Left;
        }

        public void setThe2Left(float the2Left) {
            this.the2Left = the2Left;
        }

        public float getThe3Left() {
            return the3Left;
        }

        public void setThe3Left(float the3Left) {
            this.the3Left = the3Left;
        }

        public float getThe7Left() {
            return the7Left;
        }

        public void setThe7Left(float the7Left) {
            this.the7Left = the7Left;
        }

        public float getThe14Left() {
            return the14Left;
        }

        public void setThe14Left(float the14Left) {
            this.the14Left = the14Left;
        }

        public float getThe30Left() {
            return the30Left;
        }

        public void setThe30Left(float the30Left) {
            this.the30Left = the30Left;
        }

        public float getThe60Left() {
            return the60Left;
        }

        public void setThe60Left(float the60Left) {
            this.the60Left = the60Left;
        }

        public int getThe60LeftLoginusernum() {
            return the60LeftLoginusernum;
        }

        public void setThe60LeftLoginusernum(int the60LeftLoginusernum) {
            this.the60LeftLoginusernum = the60LeftLoginusernum;
        }

        public int getThe60LeftUsercreatenum() {
            return the60LeftUsercreatenum;
        }

        public void setThe60LeftUsercreatenum(int the60LeftUsercreatenum) {
            this.the60LeftUsercreatenum = the60LeftUsercreatenum;
        }

        public float getThe90Left() {
            return the90Left;
        }

        public void setThe90Left(float the90Left) {
            this.the90Left = the90Left;
        }

        public int getThe90LeftLoginusernum() {
            return the90LeftLoginusernum;
        }

        public void setThe90LeftLoginusernum(int the90LeftLoginusernum) {
            this.the90LeftLoginusernum = the90LeftLoginusernum;
        }

        public int getThe90LeftUsercreatenum() {
            return the90LeftUsercreatenum;
        }

        public void setThe90LeftUsercreatenum(int the90LeftUsercreatenum) {
            this.the90LeftUsercreatenum = the90LeftUsercreatenum;
        }

        public int getValidatedNewUser() {
            return validatedNewUser;
        }

        public void setValidatedNewUser(int validatedNewUser) {
            this.validatedNewUser = validatedNewUser;
        }

        public int getThe60ltvNewUser() {
            return the60ltvNewUser;
        }

        public void setThe60ltvNewUser(int the60ltvNewUser) {
            this.the60ltvNewUser = the60ltvNewUser;
        }

        public int getThe60PayUser() {
            return the60PayUser;
        }

        public void setThe60PayUser(int the60PayUser) {
            this.the60PayUser = the60PayUser;
        }

        public float getThe60LTV() {
            return the60LTV;
        }

        public void setThe60LTV(float the60LTV) {
            this.the60LTV = the60LTV;
        }

        public float getLoginNewUservalidatedRadio() {
            return loginNewUservalidatedRadio;
        }

        public void setLoginNewUservalidatedRadio(float loginNewUservalidatedRadio) {
            this.loginNewUservalidatedRadio = loginNewUservalidatedRadio;
        }

        public int getLoginRadioAliveUserCount() {
            return loginRadioAliveUserCount;
        }

        public void setLoginRadioAliveUserCount(int loginRadioAliveUserCount) {
            this.loginRadioAliveUserCount = loginRadioAliveUserCount;
        }

        public float getLoginRadio() {
            return loginRadio;
        }

        public void setLoginRadio(float loginRadio) {
            this.loginRadio = loginRadio;
        }

        public int getActiveUserCount() {
            return activeUserCount;
        }

        public void setActiveUserCount(int activeUserCount) {
            this.activeUserCount = activeUserCount;
        }

        public int getAvgOnlineTime() {
            return avgOnlineTime;
        }

        public void setAvgOnlineTime(int avgOnlineTime) {
            this.avgOnlineTime = avgOnlineTime;
        }

        public int getPayCount() {
            return payCount;
        }

        public void setPayCount(int payCount) {
            this.payCount = payCount;
        }

        public int getPayUserCount() {
            return payUserCount;
        }

        public void setPayUserCount(int payUserCount) {
            this.payUserCount = payUserCount;
        }

        public int getFirstPayUserCount() {
            return firstPayUserCount;
        }

        public void setFirstPayUserCount(int firstPayUserCount) {
            this.firstPayUserCount = firstPayUserCount;
        }

        public float getActivePayRadio() {
            return activePayRadio;
        }

        public void setActivePayRadio(float activePayRadio) {
            this.activePayRadio = activePayRadio;
        }

        public float getPayARPU() {
            return payARPU;
        }

        public void setPayARPU(float payARPU) {
            this.payARPU = payARPU;
        }

        public float getActiveARPU() {
            return activeARPU;
        }

        public void setActiveARPU(float activeARPU) {
            this.activeARPU = activeARPU;
        }

        public int getNewPayUserCount() {
            return newPayUserCount;
        }

        public void setNewPayUserCount(int newPayUserCount) {
            this.newPayUserCount = newPayUserCount;
        }

        public int getNewUserPayCount() {
            return newUserPayCount;
        }

        public void setNewUserPayCount(int newUserPayCount) {
            this.newUserPayCount = newUserPayCount;
        }

        public float getNewUserPayRatio() {
            return newUserPayRatio;
        }

        public void setNewUserPayRatio(float newUserPayRatio) {
            this.newUserPayRatio = newUserPayRatio;
        }

        public float getNewPayUserARPU() {
            return newPayUserARPU;
        }

        public void setNewPayUserARPU(float newPayUserARPU) {
            this.newPayUserARPU = newPayUserARPU;
        }

        public float getThe7LTV() {
            return the7LTV;
        }

        public void setThe7LTV(float the7ltv) {
            the7LTV = the7ltv;
        }

        public float getThe14LTV() {
            return the14LTV;
        }

        public void setThe14LTV(float the14ltv) {
            the14LTV = the14ltv;
        }

        public float getThe30LTV() {
            return the30LTV;
        }

        public void setThe30LTV(float the30ltv) {
            the30LTV = the30ltv;
        }

        public String getChannelId() {
            return channelId;
        }

        public void setChannelId(String channelId) {
            this.channelId = channelId;
            this.channelName = BiPlatformManager.getChannelNameById(channelId);
        }

        public int getThe2LeftLoginusernum() {
            return the2LeftLoginusernum;
        }

        public void setThe2LeftLoginusernum(int the2LeftLoginusernum) {
            this.the2LeftLoginusernum = the2LeftLoginusernum;
        }

        public int getThe2LeftUsercreatenum() {
            return the2LeftUsercreatenum;
        }

        public void setThe2LeftUsercreatenum(int the2LeftUsercreatenum) {
            this.the2LeftUsercreatenum = the2LeftUsercreatenum;
        }

        public int getThe3LeftLoginusernum() {
            return the3LeftLoginusernum;
        }

        public void setThe3LeftLoginusernum(int the3LeftLoginusernum) {
            this.the3LeftLoginusernum = the3LeftLoginusernum;
        }

        public int getThe3LeftUsercreatenum() {
            return the3LeftUsercreatenum;
        }

        public void setThe3LeftUsercreatenum(int the3LeftUsercreatenum) {
            this.the3LeftUsercreatenum = the3LeftUsercreatenum;
        }

        public int getThe7LeftLoginusernum() {
            return the7LeftLoginusernum;
        }

        public void setThe7LeftLoginusernum(int the7LeftLoginusernum) {
            this.the7LeftLoginusernum = the7LeftLoginusernum;
        }

        public int getThe7LeftUsercreatenum() {
            return the7LeftUsercreatenum;
        }

        public void setThe7LeftUsercreatenum(int the7LeftUsercreatenum) {
            this.the7LeftUsercreatenum = the7LeftUsercreatenum;
        }

        public int getThe14LeftLoginusernum() {
            return the14LeftLoginusernum;
        }

        public void setThe14LeftLoginusernum(int the14LeftLoginusernum) {
            this.the14LeftLoginusernum = the14LeftLoginusernum;
        }

        public int getThe14LeftUsercreatenum() {
            return the14LeftUsercreatenum;
        }

        public void setThe14LeftUsercreatenum(int the14LeftUsercreatenum) {
            this.the14LeftUsercreatenum = the14LeftUsercreatenum;
        }

        public int getThe30LeftLoginusernum() {
            return the30LeftLoginusernum;
        }

        public void setThe30LeftLoginusernum(int the30LeftLoginusernum) {
            this.the30LeftLoginusernum = the30LeftLoginusernum;
        }

        public int getThe30LeftUsercreatenum() {
            return the30LeftUsercreatenum;
        }

        public void setThe30LeftUsercreatenum(int the30LeftUsercreatenum) {
            this.the30LeftUsercreatenum = the30LeftUsercreatenum;
        }

        public long getSumplaytime() {
            return sumplaytime;
        }

        public void setSumplaytime(long sumplaytime) {
            this.sumplaytime = sumplaytime;
        }

        public long getUseridnum() {
            return useridnum;
        }

        public void setUseridnum(long useridnum) {
            this.useridnum = useridnum;
        }

        public int getThe7PayUser() {
            return the7PayUser;
        }

        public void setThe7PayUser(int the7PayUser) {
            this.the7PayUser = the7PayUser;
        }

        public int getThe14PayUser() {
            return the14PayUser;
        }

        public void setThe14PayUser(int the14PayUser) {
            this.the14PayUser = the14PayUser;
        }

        public int getThe30PayUser() {
            return the30PayUser;
        }

        public void setThe30PayUser(int the30PayUser) {
            this.the30PayUser = the30PayUser;
        }

        public int getThe7ltvNewUser() {
            return the7ltvNewUser;
        }

        public void setThe7ltvNewUser(int the7ltvNewUser) {
            this.the7ltvNewUser = the7ltvNewUser;
        }

        public int getThe14ltvNewUser() {
            return the14ltvNewUser;
        }

        public void setThe14ltvNewUser(int the14ltvNewUser) {
            this.the14ltvNewUser = the14ltvNewUser;
        }

        public int getThe30ltvNewUser() {
            return the30ltvNewUser;
        }

        public void setThe30ltvNewUser(int the30ltvNewUser) {
            this.the30ltvNewUser = the30ltvNewUser;
        }
    }

    public class ChannelPayData {
        private String dateStr;
        private String platformId;
        private String channelId;
        private String platformName;
        private String channelName;
        private int newUser;
        private int income1;
        private int income2;
        private int income3;
        private int income4;
        private int income5;
        private int income6;
        private int income7;
        private int income8;
        private int income9;
        private int income10;
        private int income11;
        private int income12;
        private int income13;
        private int income14;
        private int income15;
        private int income16;
        private int income17;
        private int income18;
        private int income19;
        private int income20;
        private int income21;
        private int income22;
        private int income23;
        private int income24;
        private int income25;
        private int income26;
        private int income27;
        private int income28;
        private int income29;
        private int income30;
        private int income31;
        private int income32;
        private int income33;
        private int income34;
        private int income35;
        private int income36;
        private int income37;
        private int income38;
        private int income39;
        private int income40;
        private int income41;
        private int income42;
        private int income43;
        private int income44;
        private int income45;
        private int income46;
        private int income47;
        private int income48;
        private int income49;
        private int income50;
        private int income51;
        private int income52;
        private int income53;
        private int income54;
        private int income55;
        private int income56;
        private int income57;
        private int income58;
        private int income59;
        private int income60;
        private int income61;
        private int income62;
        private int income63;
        private int income64;
        private int income65;
        private int income66;
        private int income67;
        private int income68;
        private int income69;
        private int income70;
        private int income71;
        private int income72;
        private int income73;
        private int income74;
        private int income75;
        private int income76;
        private int income77;
        private int income78;
        private int income79;
        private int income80;
        private int income81;
        private int income82;
        private int income83;
        private int income84;
        private int income85;
        private int income86;
        private int income87;
        private int income88;
        private int income89;
        private int income90;

        public final Comparator<ChannelPayData> comparatorDate2 = new Comparator<ChannelPayData>() {
            public int compare(ChannelPayData s1, ChannelPayData s2) {
                return s1.getDateStr().compareTo(s2.getDateStr());
            }
        };

        public void setIncome(int d, int v) {
            if (d == 1) {
                this.income1 = v;
            } else if (d == 2) {
                this.income2 = v;
            } else if (d == 3) {
                this.income3 = v;
            } else if (d == 4) {
                this.income4 = v;
            } else if (d == 5) {
                this.income5 = v;
            } else if (d == 6) {
                this.income6 = v;
            } else if (d == 7) {
                this.income7 = v;
            } else if (d == 8) {
                this.income8 = v;
            } else if (d == 9) {
                this.income9 = v;
            } else if (d == 10) {
                this.income10 = v;
            } else if (d == 11) {
                this.income11 = v;
            } else if (d == 12) {
                this.income12 = v;
            } else if (d == 13) {
                this.income13 = v;
            } else if (d == 14) {
                this.income14 = v;
            } else if (d == 15) {
                this.income15 = v;
            } else if (d == 16) {
                this.income16 = v;
            } else if (d == 17) {
                this.income17 = v;
            } else if (d == 18) {
                this.income18 = v;
            } else if (d == 19) {
                this.income19 = v;
            } else if (d == 20) {
                this.income20 = v;
            } else if (d == 21) {
                this.income21 = v;
            } else if (d == 22) {
                this.income22 = v;
            } else if (d == 23) {
                this.income23 = v;
            } else if (d == 24) {
                this.income24 = v;
            } else if (d == 25) {
                this.income25 = v;
            } else if (d == 26) {
                this.income26 = v;
            } else if (d == 27) {
                this.income27 = v;
            } else if (d == 28) {
                this.income28 = v;
            } else if (d == 29) {
                this.income29 = v;
            } else if (d == 30) {
                this.income30 = v;
            } else if (d == 31) {
                this.income31 = v;
            } else if (d == 32) {
                this.income32 = v;
            } else if (d == 33) {
                this.income33 = v;
            } else if (d == 34) {
                this.income34 = v;
            } else if (d == 35) {
                this.income35 = v;
            } else if (d == 36) {
                this.income36 = v;
            } else if (d == 37) {
                this.income37 = v;
            } else if (d == 38) {
                this.income38 = v;
            } else if (d == 39) {
                this.income39 = v;
            } else if (d == 40) {
                this.income40 = v;
            } else if (d == 41) {
                this.income41 = v;
            } else if (d == 42) {
                this.income42 = v;
            } else if (d == 43) {
                this.income43 = v;
            } else if (d == 44) {
                this.income44 = v;
            } else if (d == 45) {
                this.income45 = v;
            } else if (d == 46) {
                this.income46 = v;
            } else if (d == 47) {
                this.income47 = v;
            } else if (d == 48) {
                this.income48 = v;
            } else if (d == 49) {
                this.income49 = v;
            } else if (d == 50) {
                this.income50 = v;
            } else if (d == 51) {
                this.income51 = v;
            } else if (d == 52) {
                this.income52 = v;
            } else if (d == 53) {
                this.income53 = v;
            } else if (d == 54) {
                this.income54 = v;
            } else if (d == 55) {
                this.income55 = v;
            } else if (d == 56) {
                this.income56 = v;
            } else if (d == 57) {
                this.income57 = v;
            } else if (d == 58) {
                this.income58 = v;
            } else if (d == 59) {
                this.income59 = v;
            } else if (d == 60) {
                this.income60 = v;
            } else if (d == 61) {
                this.income61 = v;
            } else if (d == 62) {
                this.income62 = v;
            } else if (d == 63) {
                this.income63 = v;
            } else if (d == 64) {
                this.income64 = v;
            } else if (d == 65) {
                this.income65 = v;
            } else if (d == 66) {
                this.income66 = v;
            } else if (d == 67) {
                this.income67 = v;
            } else if (d == 68) {
                this.income68 = v;
            } else if (d == 69) {
                this.income69 = v;
            } else if (d == 70) {
                this.income70 = v;
            } else if (d == 71) {
                this.income71 = v;
            } else if (d == 72) {
                this.income72 = v;
            } else if (d == 73) {
                this.income73 = v;
            } else if (d == 74) {
                this.income74 = v;
            } else if (d == 75) {
                this.income75 = v;
            } else if (d == 76) {
                this.income76 = v;
            } else if (d == 77) {
                this.income77 = v;
            } else if (d == 78) {
                this.income78 = v;
            } else if (d == 79) {
                this.income79 = v;
            } else if (d == 80) {
                this.income80 = v;
            } else if (d == 81) {
                this.income81 = v;
            } else if (d == 82) {
                this.income82 = v;
            } else if (d == 83) {
                this.income83 = v;
            } else if (d == 84) {
                this.income84 = v;
            } else if (d == 85) {
                this.income85 = v;
            } else if (d == 86) {
                this.income86 = v;
            } else if (d == 87) {
                this.income87 = v;
            } else if (d == 88) {
                this.income88 = v;
            } else if (d == 89) {
                this.income89 = v;
            } else if (d == 90) {
                this.income90 = v;
            }
        }

        public String getDateStr() {
            return dateStr;
        }

        public void setDateStr(String dateStr) {
            this.dateStr = dateStr;
        }

        public String getPlatformId() {
            return platformId;
        }

        public void setPlatformId(String platformId) {
            this.platformId = platformId;
            this.platformName = BiPlatformManager.getPlatformNameById(platformId);
        }

        public String getChannelId() {
            return channelId;
        }

        public void setChannelId(String channelId) {
            this.channelId = channelId;
            this.channelName = BiPlatformManager.getChannelNameById(channelId);
            this.platformId = BiPlatformManager.CHANNEL_PLATFORM_MAP.get(channelId);
        }

        public String getPlatformName() {
            return platformName;
        }

        public void setPlatformName(String platformName) {
            this.platformName = platformName;
        }

        public String getChannelName() {
            return channelName;
        }

        public void setChannelName(String channelName) {
            this.channelName = channelName;
        }

        public int getNewUser() {
            return newUser;
        }

        public void setNewUser(int newUser) {
            this.newUser = newUser;
        }

        public int getIncome1() {
            return income1;
        }

        public void setIncome1(int income1) {
            this.income1 = income1;
        }

        public int getIncome2() {
            return income2;
        }

        public void setIncome2(int income2) {
            this.income2 = income2;
        }

        public int getIncome3() {
            return income3;
        }

        public void setIncome3(int income3) {
            this.income3 = income3;
        }

        public int getIncome4() {
            return income4;
        }

        public void setIncome4(int income4) {
            this.income4 = income4;
        }

        public int getIncome5() {
            return income5;
        }

        public void setIncome5(int income5) {
            this.income5 = income5;
        }

        public int getIncome6() {
            return income6;
        }

        public void setIncome6(int income6) {
            this.income6 = income6;
        }

        public int getIncome7() {
            return income7;
        }

        public void setIncome7(int income7) {
            this.income7 = income7;
        }

        public int getIncome8() {
            return income8;
        }

        public void setIncome8(int income8) {
            this.income8 = income8;
        }

        public int getIncome9() {
            return income9;
        }

        public void setIncome9(int income9) {
            this.income9 = income9;
        }

        public int getIncome10() {
            return income10;
        }

        public void setIncome10(int income10) {
            this.income10 = income10;
        }

        public int getIncome11() {
            return income11;
        }

        public void setIncome11(int income11) {
            this.income11 = income11;
        }

        public int getIncome12() {
            return income12;
        }

        public void setIncome12(int income12) {
            this.income12 = income12;
        }

        public int getIncome13() {
            return income13;
        }

        public void setIncome13(int income13) {
            this.income13 = income13;
        }

        public int getIncome14() {
            return income14;
        }

        public void setIncome14(int income14) {
            this.income14 = income14;
        }

        public int getIncome15() {
            return income15;
        }

        public void setIncome15(int income15) {
            this.income15 = income15;
        }

        public int getIncome16() {
            return income16;
        }

        public void setIncome16(int income16) {
            this.income16 = income16;
        }

        public int getIncome17() {
            return income17;
        }

        public void setIncome17(int income17) {
            this.income17 = income17;
        }

        public int getIncome18() {
            return income18;
        }

        public void setIncome18(int income18) {
            this.income18 = income18;
        }

        public int getIncome19() {
            return income19;
        }

        public void setIncome19(int income19) {
            this.income19 = income19;
        }

        public int getIncome20() {
            return income20;
        }

        public void setIncome20(int income20) {
            this.income20 = income20;
        }

        public int getIncome21() {
            return income21;
        }

        public void setIncome21(int income21) {
            this.income21 = income21;
        }

        public int getIncome22() {
            return income22;
        }

        public void setIncome22(int income22) {
            this.income22 = income22;
        }

        public int getIncome23() {
            return income23;
        }

        public void setIncome23(int income23) {
            this.income23 = income23;
        }

        public int getIncome24() {
            return income24;
        }

        public void setIncome24(int income24) {
            this.income24 = income24;
        }

        public int getIncome25() {
            return income25;
        }

        public void setIncome25(int income25) {
            this.income25 = income25;
        }

        public int getIncome26() {
            return income26;
        }

        public void setIncome26(int income26) {
            this.income26 = income26;
        }

        public int getIncome27() {
            return income27;
        }

        public void setIncome27(int income27) {
            this.income27 = income27;
        }

        public int getIncome28() {
            return income28;
        }

        public void setIncome28(int income28) {
            this.income28 = income28;
        }

        public int getIncome29() {
            return income29;
        }

        public void setIncome29(int income29) {
            this.income29 = income29;
        }

        public int getIncome30() {
            return income30;
        }

        public void setIncome30(int income30) {
            this.income30 = income30;
        }

        public int getIncome31() {
            return income31;
        }

        public void setIncome31(int income31) {
            this.income31 = income31;
        }

        public int getIncome32() {
            return income32;
        }

        public void setIncome32(int income32) {
            this.income32 = income32;
        }

        public int getIncome33() {
            return income33;
        }

        public void setIncome33(int income33) {
            this.income33 = income33;
        }

        public int getIncome34() {
            return income34;
        }

        public void setIncome34(int income34) {
            this.income34 = income34;
        }

        public int getIncome35() {
            return income35;
        }

        public void setIncome35(int income35) {
            this.income35 = income35;
        }

        public int getIncome36() {
            return income36;
        }

        public void setIncome36(int income36) {
            this.income36 = income36;
        }

        public int getIncome37() {
            return income37;
        }

        public void setIncome37(int income37) {
            this.income37 = income37;
        }

        public int getIncome38() {
            return income38;
        }

        public void setIncome38(int income38) {
            this.income38 = income38;
        }

        public int getIncome39() {
            return income39;
        }

        public void setIncome39(int income39) {
            this.income39 = income39;
        }

        public int getIncome40() {
            return income40;
        }

        public void setIncome40(int income40) {
            this.income40 = income40;
        }

        public int getIncome41() {
            return income41;
        }

        public void setIncome41(int income41) {
            this.income41 = income41;
        }

        public int getIncome42() {
            return income42;
        }

        public void setIncome42(int income42) {
            this.income42 = income42;
        }

        public int getIncome43() {
            return income43;
        }

        public void setIncome43(int income43) {
            this.income43 = income43;
        }

        public int getIncome44() {
            return income44;
        }

        public void setIncome44(int income44) {
            this.income44 = income44;
        }

        public int getIncome45() {
            return income45;
        }

        public void setIncome45(int income45) {
            this.income45 = income45;
        }

        public int getIncome46() {
            return income46;
        }

        public void setIncome46(int income46) {
            this.income46 = income46;
        }

        public int getIncome47() {
            return income47;
        }

        public void setIncome47(int income47) {
            this.income47 = income47;
        }

        public int getIncome48() {
            return income48;
        }

        public void setIncome48(int income48) {
            this.income48 = income48;
        }

        public int getIncome49() {
            return income49;
        }

        public void setIncome49(int income49) {
            this.income49 = income49;
        }

        public int getIncome50() {
            return income50;
        }

        public void setIncome50(int income50) {
            this.income50 = income50;
        }

        public int getIncome51() {
            return income51;
        }

        public void setIncome51(int income51) {
            this.income51 = income51;
        }

        public int getIncome52() {
            return income52;
        }

        public void setIncome52(int income52) {
            this.income52 = income52;
        }

        public int getIncome53() {
            return income53;
        }

        public void setIncome53(int income53) {
            this.income53 = income53;
        }

        public int getIncome54() {
            return income54;
        }

        public void setIncome54(int income54) {
            this.income54 = income54;
        }

        public int getIncome55() {
            return income55;
        }

        public void setIncome55(int income55) {
            this.income55 = income55;
        }

        public int getIncome56() {
            return income56;
        }

        public void setIncome56(int income56) {
            this.income56 = income56;
        }

        public int getIncome57() {
            return income57;
        }

        public void setIncome57(int income57) {
            this.income57 = income57;
        }

        public int getIncome58() {
            return income58;
        }

        public void setIncome58(int income58) {
            this.income58 = income58;
        }

        public int getIncome59() {
            return income59;
        }

        public void setIncome59(int income59) {
            this.income59 = income59;
        }

        public int getIncome60() {
            return income60;
        }

        public void setIncome60(int income60) {
            this.income60 = income60;
        }

        public int getIncome61() {
            return income61;
        }

        public void setIncome61(int income61) {
            this.income61 = income61;
        }

        public int getIncome62() {
            return income62;
        }

        public void setIncome62(int income62) {
            this.income62 = income62;
        }

        public int getIncome63() {
            return income63;
        }

        public void setIncome63(int income63) {
            this.income63 = income63;
        }

        public int getIncome64() {
            return income64;
        }

        public void setIncome64(int income64) {
            this.income64 = income64;
        }

        public int getIncome65() {
            return income65;
        }

        public void setIncome65(int income65) {
            this.income65 = income65;
        }

        public int getIncome66() {
            return income66;
        }

        public void setIncome66(int income66) {
            this.income66 = income66;
        }

        public int getIncome67() {
            return income67;
        }

        public void setIncome67(int income67) {
            this.income67 = income67;
        }

        public int getIncome68() {
            return income68;
        }

        public void setIncome68(int income68) {
            this.income68 = income68;
        }

        public int getIncome69() {
            return income69;
        }

        public void setIncome69(int income69) {
            this.income69 = income69;
        }

        public int getIncome70() {
            return income70;
        }

        public void setIncome70(int income70) {
            this.income70 = income70;
        }

        public int getIncome71() {
            return income71;
        }

        public void setIncome71(int income71) {
            this.income71 = income71;
        }

        public int getIncome72() {
            return income72;
        }

        public void setIncome72(int income72) {
            this.income72 = income72;
        }

        public int getIncome73() {
            return income73;
        }

        public void setIncome73(int income73) {
            this.income73 = income73;
        }

        public int getIncome74() {
            return income74;
        }

        public void setIncome74(int income74) {
            this.income74 = income74;
        }

        public int getIncome75() {
            return income75;
        }

        public void setIncome75(int income75) {
            this.income75 = income75;
        }

        public int getIncome76() {
            return income76;
        }

        public void setIncome76(int income76) {
            this.income76 = income76;
        }

        public int getIncome77() {
            return income77;
        }

        public void setIncome77(int income77) {
            this.income77 = income77;
        }

        public int getIncome78() {
            return income78;
        }

        public void setIncome78(int income78) {
            this.income78 = income78;
        }

        public int getIncome79() {
            return income79;
        }

        public void setIncome79(int income79) {
            this.income79 = income79;
        }

        public int getIncome80() {
            return income80;
        }

        public void setIncome80(int income80) {
            this.income80 = income80;
        }

        public int getIncome81() {
            return income81;
        }

        public void setIncome81(int income81) {
            this.income81 = income81;
        }

        public int getIncome82() {
            return income82;
        }

        public void setIncome82(int income82) {
            this.income82 = income82;
        }

        public int getIncome83() {
            return income83;
        }

        public void setIncome83(int income83) {
            this.income83 = income83;
        }

        public int getIncome84() {
            return income84;
        }

        public void setIncome84(int income84) {
            this.income84 = income84;
        }

        public int getIncome85() {
            return income85;
        }

        public void setIncome85(int income85) {
            this.income85 = income85;
        }

        public int getIncome86() {
            return income86;
        }

        public void setIncome86(int income86) {
            this.income86 = income86;
        }

        public int getIncome87() {
            return income87;
        }

        public void setIncome87(int income87) {
            this.income87 = income87;
        }

        public int getIncome88() {
            return income88;
        }

        public void setIncome88(int income88) {
            this.income88 = income88;
        }

        public int getIncome89() {
            return income89;
        }

        public void setIncome89(int income89) {
            this.income89 = income89;
        }

        public int getIncome90() {
            return income90;
        }

        public void setIncome90(int income90) {
            this.income90 = income90;
        }
    }
}
